From e50e3126c75bc2bfff0c7b31aecdae2ebd2b0fd9 Mon Sep 17 00:00:00 2001 From: Olivier Refalo Date: Wed, 25 Apr 2012 11:12:13 -0300 Subject: host_color: modulo calculation is wrong --- git-prompt.sh | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3