From 8a8414fb573c40dd6f88ea78ea97fba364da6370 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 19 Dec 2019 12:03:23 +0300 Subject: [PATCH] fix #75 --- rc/modules/VCS/fzf-bzr.kak | 8 ++++---- rc/modules/VCS/fzf-git.kak | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rc/modules/VCS/fzf-bzr.kak b/rc/modules/VCS/fzf-bzr.kak index a121f32..e0f27a2 100644 --- a/rc/modules/VCS/fzf-bzr.kak +++ b/rc/modules/VCS/fzf-bzr.kak @@ -15,7 +15,7 @@ Supported tools: GNU Bazaar: ""bzr"" Default arguments: - '(cd $repo_root && bzr ls -R --versioned | awk \""{printf \\\""$repo_root/\\\"" \\\$0 \\\""\\\n\\\"" }\"")' + '(cd $repo_root && bzr ls -R --versioned)' " \ str fzf_bzr_command "bzr" @@ -24,11 +24,11 @@ map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' ': fzf-b define-command -hidden fzf-bzr %{ evaluate-commands %sh{ repo_root=$(bzr root) case $kak_opt_fzf_bzr_command in - (bzr) cmd="(cd $repo_root && bzr ls -R --versioned | awk \"{printf \\\"$repo_root/\\\" \\\$0 \\\"\\\n\\\" }\")" ;; - (bzr*) cmd=$kak_opt_fzf_bzr_command ;; + (bzr) cmd="(cd $repo_root && bzr ls -R --versioned)" ;; + (*) cmd=$kak_opt_fzf_bzr_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 \\\"$repo_root/\\\"}\"}" }} § diff --git a/rc/modules/VCS/fzf-git.kak b/rc/modules/VCS/fzf-git.kak index 200c0e8..117f184 100644 --- a/rc/modules/VCS/fzf-git.kak +++ b/rc/modules/VCS/fzf-git.kak @@ -12,10 +12,10 @@ hook global ModuleLoaded fzf_vcs %§ declare-option -docstring "command to provide list of files in git tree to fzf. Arguments are supported Supported tools: : : - Git : ""git"" + Git: ""git"" Default arguments: - 'repo_root=$(git rev-parse --show-toplevel); git ls-tree --full-tree --name-only -r HEAD | awk ""{print \""$repo_root/\"" \$0}""' + 'git ls-tree --full-tree --name-only -r HEAD' " \ str fzf_git_command "git"