when in a ssh session and in case of default user only display where instead of who@where
This commit is contained in:
parent
5464fe3e4a
commit
5e0e3ce194
@ -79,8 +79,10 @@ 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" ]]; then
|
||||
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
|
||||
elif [[ "$USER" == "$DEFAULT_USER" && -n "$SSH_CLIENT" ]]; then
|
||||
prompt_segment black default "%(!.%{%F{yellow}%}.)%m"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user