From acde9d3b9617db8a542294422289512bbce1266e Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Sun, 15 May 2016 20:08:56 -0300 Subject: [PATCH] Add option to disable git stash flagging --- fish_prompt.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 051e99a..b469589 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -19,6 +19,7 @@ # # set -g theme_display_git no # set -g theme_display_git_untracked no +# set -g theme_display_git_stashed no # set -g theme_display_git_ahead_verbose yes # set -g theme_git_worktree_support yes # set -g theme_display_vagrant yes @@ -382,9 +383,13 @@ end function __bobthefish_prompt_git -S -a current_dir -d 'Display the actual git state' set -l dirty (command git diff --no-ext-diff --quiet --exit-code; or echo -n '*') set -l staged (command git diff --cached --no-ext-diff --quiet --exit-code; or echo -n '~') - set -l stashed (command git rev-parse --verify --quiet refs/stash >/dev/null; and echo -n '$') set -l ahead (__bobthefish_git_ahead) + set -l stashed '' + if [ "$theme_display_git_stashed" != 'no' ] + set stashed (command git rev-parse --verify --quiet refs/stash >/dev/null; and echo -n '$') + end + set -l new '' set -l show_untracked (command git config --bool bash.showUntrackedFiles) if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ]