From f812a2727769f8d3d78b98db0c64089bc21f48fe Mon Sep 17 00:00:00 2001 From: Claudio Mezzasalma Date: Wed, 23 Jan 2019 09:50:22 +0100 Subject: [PATCH] Verbose and non-verbose stashes are now mutually exclusive --- fish_prompt.fish | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 4292227..9d27cb6 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -286,14 +286,14 @@ function __bobthefish_git_dirty_verbose -S -d 'Print a more verbose dirty state end function __bobthefish_git_stashed -S -d 'Print the stashed state for the current branch' - command git rev-parse --verify --quiet refs/stash >/dev/null - or return - - echo -n "$git_stashed_glyph" if [ "$theme_display_git_stashed_verbose" = 'yes' ] - command git rev-list --walk-reflogs --count refs/stash 2>/dev/null - end + set -l stashed (command git rev-list --walk-reflogs --count refs/stash 2>/dev/null) + or return + echo -n "$git_stashed_glyph$stashed" + else + command git rev-parse --verify --quiet refs/stash >/dev/null; and echo -n "$git_stashed_glyph" + end end