diff --git a/rc/modules/VCS/fzf-bzr.kak b/rc/modules/VCS/fzf-bzr.kak index 79af7c0..a121f32 100644 --- a/rc/modules/VCS/fzf-bzr.kak +++ b/rc/modules/VCS/fzf-bzr.kak @@ -15,21 +15,20 @@ Supported tools: GNU Bazaar: ""bzr"" Default arguments: - ""bzr ls -R --versioned -0"" + '(cd $repo_root && bzr ls -R --versioned | awk \""{printf \\\""$repo_root/\\\"" \\\$0 \\\""\\\n\\\"" }\"")' " \ str fzf_bzr_command "bzr" map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' ': fzf-bzr' define-command -hidden fzf-bzr %{ evaluate-commands %sh{ - current_path=$(pwd) repo_root=$(bzr root) case $kak_opt_fzf_bzr_command in - (bzr) cmd="bzr ls -R --versioned -0" ;; + (bzr) cmd="(cd $repo_root && bzr ls -R --versioned | awk \"{printf \\\"$repo_root/\\\" \\\$0 \\\"\\\n\\\" }\")" ;; (bzr*) 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 %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags} -post-action %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags}" }} § diff --git a/rc/modules/VCS/fzf-hg.kak b/rc/modules/VCS/fzf-hg.kak index 1acc9ea..743e0af 100644 --- a/rc/modules/VCS/fzf-hg.kak +++ b/rc/modules/VCS/fzf-hg.kak @@ -15,21 +15,19 @@ Supported tools: Mercurial SCM: ""hg"" Default arguments: - ""hg locate -f -0 -I .hg locate -f -0 -I ."" + ""hg locate -f"" " \ str fzf_hg_command "hg" map global fzf-vcs -docstring "edit file from mercurial tree" 'h' ': fzf-hg' define-command -hidden fzf-hg %{ evaluate-commands %sh{ - current_path=$(pwd) - repo_root=$(hg root) case $kak_opt_fzf_hg_command in - (hg) cmd="hg locate -f -0 -I .hg locate -f -0 -I ." ;; + (hg) cmd="hg locate -f" ;; (hg*) cmd=$kak_opt_fzf_hg_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 %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags} -post-action %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect $kak_opt_fzf_window_map $additional_flags}" }} §