mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Fish didn't like the tac/tail switch. Also removed some print statements (#220)
This commit is contained in:
parent
6ce2c25490
commit
bd8fce74a6
|
|
@ -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 %
|
||||
|
|
|
|||
Loading…
Reference in a new issue