diff options
author | Leonid Volnitsky <leonid@volnitsky.com> | 2012-07-06 09:44:53 -0700 |
---|---|---|
committer | Leonid Volnitsky <leonid@volnitsky.com> | 2012-07-06 09:44:53 -0700 |
commit | 4aad5286f26037896681918aedc16033654cec65 (patch) | |
tree | 7046ddab57a553e56b2b3ed040f15204df2431c2 | |
parent | Merge branch 'master' of https://github.com/tomhoover/git-prompt into tomhoov... (diff) | |
parent | host_color: modulo calculation is wrong (diff) | |
download | git-prompt-4aad5286f26037896681918aedc16033654cec65.tar.gz git-prompt-4aad5286f26037896681918aedc16033654cec65.tar.bz2 git-prompt-4aad5286f26037896681918aedc16033654cec65.zip |
Merge pull request #26 from orefalo/master
fixed: host_color index lookup error
-rwxr-xr-x | git-prompt.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index d6fba92..954a059 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -1,4 +1,3 @@ - # don't set prompt if this is not interactive shell [[ $- != *i* ]] && return @@ -309,7 +308,7 @@ set_shell_label() { host_color=${uphost}_host_color host_color=${!host_color} if [[ -z $host_color && -x /usr/bin/cksum ]] ; then - cksum_color_no=`echo $uphost | cksum | awk '{print $1%7}'` + cksum_color_no=`echo $uphost | cksum | awk '{print $1%6}'` color_index=(green yellow blue magenta cyan white) # FIXME: bw, color-256 host_color=${color_index[cksum_color_no]} fi |