Add default hostname check to Agnoster theme

This commit is contained in:
Ross Wolfson 2017-03-09 21:34:10 +00:00
parent b908feebcf
commit 5d6e41b8ae

View File

@ -79,7 +79,8 @@ prompt_end() {
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
if [[ "$USER" != "$DEFAULT_USER" || \
( -n "$SSH_CLIENT" && "$HOSTNAME" != "$DEFAULT_HOSTNAME" ) ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
fi
}