From 33ad0ea71e835be7ec2a16e0ba684e55d0dca0a3 Mon Sep 17 00:00:00 2001 From: Peter Tri Ho Date: Sun, 10 Apr 2022 15:31:00 +1000 Subject: [PATCH] fix: `forgit::rebase` not working in fish --- conf.d/forgit.plugin.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index 53a1b29..483b1f0 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -374,7 +374,7 @@ function forgit::rebase -d "git rebase" else set graph "" end - set preview "git log $graph --color=always --format='$forgit_log_format' $argv $forgit_emojify" + set cmd "git log $graph --color=always --format='$forgit_log_format' $argv $forgit_emojify" set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p') set preview "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager" @@ -392,7 +392,7 @@ function forgit::rebase -d "git rebase" --preview=\"$preview\" $FORGIT_REBASE_FZF_OPTS " - set commit (eval "$preview" | FZF_DEFAULT_OPTS="$opts" fzf | + set commit (eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | grep -Eo '[a-f0-9]+' | head -1) if test $commit