summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2010-05-28 16:33:50 +0100
committerGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2010-05-28 16:33:50 +0100
commit61278219f17f8a1ad3b23e5037def1f1ce40ff8e (patch)
tree5aa27635d2052303d631fe37835d182fd3452d72
parentwhere this came from (diff)
downloadgit-prompt-61278219f17f8a1ad3b23e5037def1f1ce40ff8e.tar.gz
git-prompt-61278219f17f8a1ad3b23e5037def1f1ce40ff8e.tar.bz2
git-prompt-61278219f17f8a1ad3b23e5037def1f1ce40ff8e.zip
add a (prefix) to the prompt
-rwxr-xr-xgit-prompt.sh6
1 files 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 "