mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Match "or return" style used elsewhere
This commit is contained in:
parent
180f251189
commit
8bd72dbe19
@ -222,7 +222,7 @@ end
|
|||||||
|
|
||||||
function __bobthefish_git_ahead_verbose -S -d 'Print a more verbose ahead/behind state for the current branch'
|
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)
|
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 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 '^<'))
|
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'
|
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 }')
|
set -l changes (command git diff --numstat | awk '{ added += $1; removed += $2 } END { print "+" added "/-" removed }')
|
||||||
[ $status != 0 ]; and return
|
or return
|
||||||
|
|
||||||
echo "$changes "
|
echo "$changes "
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user