From cab4908f1d63acdc0a43c7549eb530591d48cc2b Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 15 Sep 2019 22:29:33 +0300 Subject: [PATCH] cd to file's dir --- rc/tools/git.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/tools/git.kak b/rc/tools/git.kak index b8336f03..10efed51 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -91,7 +91,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- } update_diff() { - git --no-pager diff -U0 "$kak_buffile" | perl -e ' + ( cd "${kak_buffile%/*}" && git --no-pager diff -U0 "$kak_buffile" | perl -e ' $flags = $ENV{"kak_timestamp"}; foreach $line () { if ($line =~ /@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?/) { @@ -140,7 +140,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- } } print "set-option buffer git_diff_flags $flags" - ' + ' ) }