From d2229c50a0dfb5d0c4fb17243a8bbca155fdda25 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 5 Sep 2013 13:21:58 +0200 Subject: [PATCH] Followup to #11 Should fix #12 --- pure.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pure.zsh b/pure.zsh index 8c92f5c..feedfa2 100644 --- a/pure.zsh +++ b/pure.zsh @@ -32,10 +32,9 @@ # enable prompt substitution setopt PROMPT_SUBST - # only show username if not default. - # if SSH_CLIENT or SSH_TTY is defined, it's an ssh session. - if [[ "$SSH_CLIENT" ]] || [[ "$SSH_TTY" ]]; then - local username='%n@%m ' + # show username@host if logged in through SSH + if [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then + local username='%n@%m ' fi # fastest possible way to check if repo is dirty