From fe912482b56811afc4fb4ebe5430eee6ea2341ab Mon Sep 17 00:00:00 2001 From: Christopher Apple Date: Sun, 5 Dec 2021 15:17:05 -0800 Subject: [PATCH] Reverted change b1c4c11959929228afd9a60210fd02c65f00ceda --- conf.d/forgit.plugin.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index 7d64814..18b7f60 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -101,10 +101,10 @@ function forgit::add -d "git add selector" set preview " set file (echo {} | $extract_file) # exit - if test (git status -s -- \\\$file | grep '^??') # diff with /dev/null for untracked files - git diff --color=always --no-index -- /dev/null \\\$file | $forgit_diff_pager | sed '2 s/added:/untracked:/' + if test (git status -s -- \$file | grep '^??') # diff with /dev/null for untracked files + git diff --color=always --no-index -- /dev/null \$file | $forgit_diff_pager | sed '2 s/added:/untracked:/' else - git diff --color=always -- \\\$file | $forgit_diff_pager + git diff --color=always -- \$file | $forgit_diff_pager end " set opts " @@ -115,7 +115,7 @@ function forgit::add -d "git add selector" set files (git -c color.status=always -c status.relativePaths=true status -su | grep -F -e "$changed" -e "$unmerged" -e "$untracked" | sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)\$/[\1] \2/' | # deal with white spaces internal to fname - env FZF_DEFAULT_OPTS="$opts" fzf --preview="fish -c \"$preview\"" | + env FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | sh -c "$extract_file") # for rename case if test -n "$files"