From 760fe56428edcdc74165260a905e2adef9f99314 Mon Sep 17 00:00:00 2001 From: Wenxuan Zhang Date: Tue, 22 Oct 2019 12:28:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20relative=20path=20i?= =?UTF-8?q?ssue=20on=20`forgit::diff`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: e1418c040214ae4692218c99e5291a99a09a6665 --- forgit.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index cf894f4..6d80251 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -43,7 +43,7 @@ forgit::diff() { +m -0 --preview=\"$cmd\" --bind=\"enter:execute($cmd |LESS='-R' less)\" $FORGIT_DIFF_FZF_OPTS " - eval "git diff --name-only --relative $commit -- ${files[*]}"| + eval "git diff --name-only $commit -- ${files[*]} | xargs -I% realpath --relative-to=. '$(git rev-parse --show-toplevel)/%'"| FZF_DEFAULT_OPTS="$opts" fzf }