From 61278219f17f8a1ad3b23e5037def1f1ce40ff8e Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Fri, 28 May 2010 16:33:50 +0100 Subject: add a (prefix) to the prompt --- git-prompt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-prompt.sh b/git-prompt.sh index c59195f..118ba6e 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -307,10 +307,10 @@ set_shell_label() { #################################################################### WHO_WHERE # [[user@]host[-tty]] - if [[ -n $id || -n $host ]] ; then + if [[ -n $id || -n $host || -n $special_env ]] ; then [[ -n $id && -n $host ]] && at='@' || at='' - color_who_where="${id}${host:+$host_color$at$host}${tty:+ $tty}" - plain_who_where="${id}$at$host" + color_who_where="${special_env:+($special_env) }${id}${host:+$host_color$at$host}${tty:+ $tty}" + plain_who_where="${special_env:+($special_env) }${id}$at$host" # add trailing " " color_who_where="$color_who_where " -- cgit v1.2.3