c944f8b465e6c28f9a42ac6d71c90ddf9a5b5742

Author
Felipe Contreras <felipe.contreras@gmail.com>
Committer
Felipe Contreras <felipe.contreras@gmail.com>
Date

Message

gitfast: fix prompt

Certain themes need the 'clean' mark, and some people like to have the
'dirty' one, just like the original git_promp_info().

We probably shouldn't be modifying that function, there's no other clean
way to achieve our own status information, so let's try to emulate the
original as much as possible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Diff

 1diff --git a/plugins/gitfast/gitfast.plugin.zsh b/plugins/gitfast/gitfast.plugin.zsh
 2index 7e50cf721cb33e5f090379cb43b2c53950a17902..dba1b13152007b87b0e4774d3fcc291bc9d9381c 100644
 3--- a/plugins/gitfast/gitfast.plugin.zsh
 4+++ b/plugins/gitfast/gitfast.plugin.zsh
 5@@ -3,5 +3,6 @@ source $dir/../git/git.plugin.zsh
 6 source $dir/git-prompt.sh
 7 
 8 function git_prompt_info() {
 9-  __git_ps1 "${ZSH_THEME_GIT_PROMPT_PREFIX//\%/%%}%s${ZSH_THEME_GIT_PROMPT_SUFFIX//\%/%%}"
10+  dirty="$(parse_git_dirty)"
11+  __git_ps1 "${ZSH_THEME_GIT_PROMPT_PREFIX//\%/%%}%s${dirty//\%/%%}${ZSH_THEME_GIT_PROMPT_SUFFIX//\%/%%}"
12 }