summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Refalo <orefalo@yahoo.com>2012-04-25 11:12:13 -0300
committerOlivier Refalo <orefalo@yahoo.com>2012-04-25 11:12:13 -0300
commite50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9 (patch)
tree7100dd554c8192f90e366ce02a06d90e5df06627
parentfix for enable/disable_set_shell_label (diff)
downloadgit-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.tar.gz
git-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.tar.bz2
git-prompt-e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9.zip
host_color: modulo calculation is wrong
-rwxr-xr-xgit-prompt.sh3
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