From ec506b5b9b9efeeda6df0568d1edc3698050ed8e Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 19 Dec 2019 11:44:05 +0300 Subject: [PATCH] partly fix #75 --- rc/modules/VCS/fzf-git.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/modules/VCS/fzf-git.kak b/rc/modules/VCS/fzf-git.kak index 98883ab..200c0e8 100644 --- a/rc/modules/VCS/fzf-git.kak +++ b/rc/modules/VCS/fzf-git.kak @@ -24,11 +24,11 @@ map global fzf-vcs -docstring "edit file from Git tree" 'g' ': fzf-git define-command -override -hidden fzf-git %{ evaluate-commands %sh{ case $kak_opt_fzf_git_command in - (git) cmd='repo_root=$(git rev-parse --show-toplevel); git ls-tree --full-tree --name-only -r HEAD | awk "{print \"$repo_root/\" \$0}"' ;; - (git*) cmd=$kak_opt_fzf_git_command ;; + (git) cmd='git ls-tree --full-tree --name-only -r HEAD' ;; + (*) cmd=$kak_opt_fzf_git_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect $kak_opt_fzf_vertical_map --expect $kak_opt_fzf_horizontal_map" - printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags}" + printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags} -filter %{perl -pe \"if (/$kak_opt_fzf_window_map|$kak_opt_fzf_vertical_map|$kak_opt_fzf_horizontal_map|^$/) {} else {print \\\"$(git rev-parse --show-toplevel)/\\\"}\"}" }} ยง