Fix uniqueness and escape question-marks

This commit is contained in:
Terje Larsen 2012-11-13 21:41:43 +01:00 committed by ridiculousfish
parent 7d45e6f12f
commit ed4e6cd3a5

View file

@ -18,7 +18,7 @@ function __terlar_git_prompt --description 'Write out the git prompt'
echo -n '|' echo -n '|'
set -l index (git status --porcelain ^/dev/null|cut -c 1-2|uniq) set -l index (git status --porcelain ^/dev/null|cut -c 1-2|sort -u)
if test -z "$index" if test -z "$index"
set_color $fish_color_git_clean set_color $fish_color_git_clean
@ -42,7 +42,7 @@ function __terlar_git_prompt --description 'Write out the git prompt'
case 'R ' ; set renamed case 'R ' ; set renamed
case 'C ' ; set copied case 'C ' ; set copied
case 'D ' ' D' ; set deleted case 'D ' ' D' ; set deleted
case '??' ; set untracked case '\?\?' ; set untracked
case 'U*' '*U' 'DD' 'AA'; set unmerged case 'U*' '*U' 'DD' 'AA'; set unmerged
end end
end end