From 8bd72dbe19779aeb1c3de86771d5279b7c714115 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 20 Feb 2018 22:30:19 -0800 Subject: [PATCH] Match "or return" style used elsewhere --- fish_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 827587b..71ad22a 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -222,7 +222,7 @@ end function __bobthefish_git_ahead_verbose -S -d 'Print a more verbose ahead/behind state for the current branch' set -l commits (command git rev-list --left-right '@{upstream}...HEAD' ^/dev/null) - [ $status != 0 ]; and return + or return set -l behind (count (for arg in $commits; echo $arg; end | command grep '^<')) set -l ahead (count (for arg in $commits; echo $arg; end | command grep -v '^<')) @@ -242,7 +242,7 @@ end function __bobthefish_git_dirty_verbose -S -d 'Print a more verbose dirty state for the current working tree' set -l changes (command git diff --numstat | awk '{ added += $1; removed += $2 } END { print "+" added "/-" removed }') - [ $status != 0 ]; and return + or return echo "$changes " end