fix: 🐛 Fix relative path issue on forgit::diff

Former-commit-id: e1418c0402
This commit is contained in:
Wenxuan Zhang 2019-10-22 12:28:55 +08:00
parent c917df6296
commit 760fe56428

View file

@ -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
}