From 59dd63be779433b29090b0f28106cdfde270f35a Mon Sep 17 00:00:00 2001 From: Tim <45259958+carlfriedrich@users.noreply.github.com> Date: Fri, 2 Dec 2022 08:33:07 +0100 Subject: [PATCH] Fix forgit diff displaying renames on MacOS (#250) MacOS's 'sed' variant obviously does not parse '\t' as a tabstop per default. Replacing it with a literal tabstop to make this work. --- bin/git-forgit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-forgit b/bin/git-forgit index 2bc44ad..dc72704 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -123,8 +123,8 @@ _forgit_diff() { $FORGIT_DIFF_FZF_OPTS --prompt=\"$commits > \" " - eval "git diff --name-status $commits -- ${files[*]} | sed -E 's/^([[:alnum:]]+)[[:space:]]+(.*)$/[\1]\t\2/'" | - sed 's/\t/ -> /2' | expand -t 8 | + eval "git diff --name-status $commits -- ${files[*]} | sed -E 's/^([[:alnum:]]+)[[:space:]]+(.*)$/[\1] \2/'" | + sed 's/ / -> /2' | expand -t 8 | FZF_DEFAULT_OPTS="$opts" fzf fzf_exit_code=$? # exit successfully on 130 (ctrl-c/esc)