diff options
author | Olivier Refalo <orefalo@yahoo.com> | 2012-04-25 11:12:13 -0300 |
---|---|---|
committer | Olivier Refalo <orefalo@yahoo.com> | 2012-04-25 11:12:13 -0300 |
commit | e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9 (patch) | |
tree | 7100dd554c8192f90e366ce02a06d90e5df06627 /git-prompt.sh | |
parent | fix for enable/disable_set_shell_label (diff) | |
download | git-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.tar.gz git-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.tar.bz2 git-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.zip |
host_color: modulo calculation is wrong
Diffstat (limited to 'git-prompt.sh')
-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 41aa587..8e6b08c 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 |