diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-04-22 06:24:30 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-04-22 06:29:24 +0300 |
commit | bd894d9ffb776563ad4ffdbef2df3f4576761233 (patch) | |
tree | ce7a4673249b2d1721f62402ab728f947bb1cd0e /git-prompt.sh | |
parent | rev-number (hex) now in dim (half-bright) color (diff) | |
download | git-prompt-bd894d9ffb776563ad4ffdbef2df3f4576761233.tar.gz git-prompt-bd894d9ffb776563ad4ffdbef2df3f4576761233.tar.bz2 git-prompt-bd894d9ffb776563ad4ffdbef2df3f4576761233.zip |
fixied: clean repo detection; new hexlen default=5; removed ":" before file list
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 30ca64e..95559b8 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -6,8 +6,9 @@ ##### read config file if any. - unset dir_color rc_color user_id_color root_id_color init_vcs_color clean_vcs_color - unset modified_vcs_color added_vcs_color addmoded_vcs_color untracked_vcs_color op_vcs_color detached_vcs_color + unset dir_color rc_color user_id_color root_id_color init_vcs_color clean_vcs_color + unset modified_vcs_color added_vcs_color addmoded_vcs_color untracked_vcs_color op_vcs_color detached_vcs_color hex_vcs_color + unset rawhex_len conf=git-prompt.conf; [[ -r $conf ]] && . $conf conf=/etc/git-prompt.conf; [[ -r $conf ]] && . $conf @@ -57,7 +58,7 @@ max_file_list_length=${max_file_list_length:-100} upcase_hostname=${upcase_hostname:-on} count_only=${count_only:-off} - rawhex_len=${rawhex_len:-6} + rawhex_len=${rawhex_len:-5} aj_max=20 @@ -415,7 +416,7 @@ parse_git_status() { git status 2>/dev/null | sed -n ' s/^# On branch /branch=/p - s/^nothing to commit (working directory clean)/clean=clean/p + s/^nothing to commit/clean=clean/p s/^# Initial commit/init=init/p /^# Changes to be committed:/,/^# [A-Z]/ { @@ -585,7 +586,6 @@ parse_vcs_status() { [[ ${untracked_files[0]} ]] && file_list+=" "$untracked_vcs_color${untracked_files[@]} fi [[ ${vim_files} ]] && file_list+=" "${RED}vim:${vim_files} - file_list=${file_list:+:$file_list} if [[ ${#file_list} -gt $max_file_list_length ]] ; then file_list=${file_list:0:$max_file_list_length} |