removing extra space when git folder is not dirty

This commit is contained in:
Bruno Pinto 2012-07-24 19:23:55 -03:00
parent 266512f577
commit a89e87d475

View File

@ -2,9 +2,11 @@ function fish_prompt
if [ (git_branch_name) ]
if [ (is_git_dirty) ]
set git_dirty "✗"
end
printf '%s➜ %s %s git:(%s%s%s) %s ' (set_color red) (set_color blue) (basename (prompt_pwd)) (set_color red) (git_branch_name) (set_color blue) $git_dirty
printf '%s➜ %s %s git:(%s%s%s) %s ' (set_color red) (set_color blue) (basename (prompt_pwd)) (set_color red) (git_branch_name) (set_color blue) $git_dirty
else
printf '%s➜ %s %s git:(%s%s%s) ' (set_color red) (set_color blue) (basename (prompt_pwd)) (set_color red) (git_branch_name) (set_color blue)
end
else
printf '%s➜ %s %s ' (set_color red) (set_color blue) (basename (prompt_pwd))
end