From 6e5cf8619812f375589019bde330aad1f73d00b0 Mon Sep 17 00:00:00 2001 From: Georg Ogris Date: Fri, 18 Dec 2015 11:50:50 +0100 Subject: [PATCH] when in a ssh session and in case of default user only display where instead of who@where --- themes/agnoster.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 103041eef..a165a6d03 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -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 }