Fish didn't like the tac/tail switch. Also removed some print statements (#220)

This commit is contained in:
Chris Apple 2022-07-14 19:05:09 -07:00 committed by GitHub
parent 6ce2c25490
commit bd8fce74a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,11 @@ end
function forgit::reverse_lines
# tac is not available on OSX, tail -r is not available on Linux, so we use either of them
tac 2> /dev/null || tail -r
if command -v tac &> /dev/null
tac
else
tail -r
end
end
set -g forgit_pager "$FORGIT_PAGER"
@ -351,8 +355,6 @@ function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target'
-m -0 --tiebreak=index
$FORGIT_CHERRY_PICK_FZF_OPTS
"
echo $base
echo $target
git cherry "$base" "$target" --abbrev -v | forgit::reverse_lines |
env FZF_DEFAULT_OPTS="$opts" fzf | cut -d' ' -f2 | forgit::reverse_lines |
xargs -I% git cherry-pick %