From 5f00816c364fa49ff7b7b596aee5653a9c057d16 Mon Sep 17 00:00:00 2001 From: Philip Fulgham Date: Tue, 20 Feb 2018 22:20:33 -0500 Subject: [PATCH] Simplify git dirty verbose setting check --- fish_prompt.fish | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index be09cdc..aeb274e 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -723,10 +723,9 @@ function __bobthefish_prompt_git -S -a current_dir -d 'Display the actual git st if [ "$theme_display_git_dirty" != 'no' ] set -l show_dirty (command git config --bool bash.showDirtyState ^/dev/null) if [ "$show_dirty" != 'false' ] - if [ "$theme_display_git_dirty_verbose" = 'yes' ] - set dirty (command git diff --no-ext-diff --quiet --exit-code ^/dev/null; or echo -n "$__bobthefish_git_dirty_glyph"(__bobthefish_git_dirty_verbose)) - else - set dirty (command git diff --no-ext-diff --quiet --exit-code ^/dev/null; or echo -n "$__bobthefish_git_dirty_glyph") + set dirty (command git diff --no-ext-diff --quiet --exit-code ^/dev/null; or echo -n "$__bobthefish_git_dirty_glyph") + if [ "$dirty" -a "$theme_display_git_dirty_verbose" = 'yes' ] + set dirty "$dirty"(__bobthefish_git_dirty_verbose) end end end