diff --git a/rc/fzf-modules/VCS/fzf-bzr.kak b/rc/fzf-modules/VCS/fzf-bzr.kak index e092c06..7d0711a 100644 --- a/rc/fzf-modules/VCS/fzf-bzr.kak +++ b/rc/fzf-modules/VCS/fzf-bzr.kak @@ -29,6 +29,6 @@ define-command -hidden fzf-bzr %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_bzr_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "fzf %{cd $repo_root; edit -existing} %{$cmd} %{-m --expect ctrl-w $additional_flags} %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ctrl-w $additional_flags} -post-action %{cd $current_path}" }} diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak index 9e3d065..b755263 100644 --- a/rc/fzf-modules/VCS/fzf-git.kak +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -29,6 +29,6 @@ define-command -override -hidden fzf-git %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_git_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "fzf %{cd $repo_root; edit -existing} %{$cmd} %{-m --expect ctrl-w $additional_flags} %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ctrl-w $additional_flags} -post-action %{cd $current_path}" }} diff --git a/rc/fzf-modules/VCS/fzf-hg.kak b/rc/fzf-modules/VCS/fzf-hg.kak index 8de51eb..3efe92f 100644 --- a/rc/fzf-modules/VCS/fzf-hg.kak +++ b/rc/fzf-modules/VCS/fzf-hg.kak @@ -29,6 +29,6 @@ define-command -hidden fzf-hg %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_hg_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "fzf %{cd $repo_root; edit -existing} %{$cmd} %{-m --expect ctrl-w $additional_flags} %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ctrl-w $additional_flags} -post-action %{cd $current_path}" }} diff --git a/rc/fzf-modules/VCS/fzf-svn.kak b/rc/fzf-modules/VCS/fzf-svn.kak index 724228f..853b4a4 100644 --- a/rc/fzf-modules/VCS/fzf-svn.kak +++ b/rc/fzf-modules/VCS/fzf-svn.kak @@ -29,6 +29,6 @@ define-command -hidden fzf-svn %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_svn_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "fzf %{cd $repo_root; edit -existing} %{$cmd} %{-m --expect ctrl-w $additional_flags} %{cd $current_path}" + printf "%s\n" "fzf -kak-cmd %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ctrl-w $additional_flags} -post-action %{cd $current_path}" }} diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak index 85b547d..ff16d12 100644 --- a/rc/fzf-modules/fzf-buffer.kak +++ b/rc/fzf-modules/fzf-buffer.kak @@ -27,5 +27,5 @@ define-command -hidden fzf-buffer %{ evaluate-commands %sh{ printf "%s\n" "info -title 'fzf buffer' '$message$tmux_keybindings'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "fzf %{buffer} %{(cat $buffers; rm $buffers)} %{--expect ctrl-w $additional_flags}" + printf "%s\n" "fzf -kak-cmd %{buffer} -items-cmd %{(cat $buffers; rm $buffers)} -fzf-args %{--expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index 58b7620..f217df7 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -44,6 +44,6 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ if [ $kak_opt_fzf_cd_preview = "true" ]; then preview="--preview '($kak_opt_cd_preview_cmd) 2>/dev/null | head -n $kak_opt_fzf_preview_dirs'" fi - printf "%s\n" "fzf %{change-directory} %{$items_command} %{$preview} %{fzf-cd}" + printf "%s\n" "fzf -preview -kak-cmd %{change-directory} -items-cmd %{$items_command} -fzf-args %{$preview} -post-action %{fzf-cd}" }} diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index dd252c2..d37a5b4 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -823,5 +823,5 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" printf "%s\n" "set-option -add window ctagsfiles %{$path/$kak_opt_fzf_tag_file_name}" - printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags}" + printf "%s\n" "fzf -kak-cmd %{ctags-search} -items-cmd %{$cmd | awk '!a[\$0]++'} -fzf-args %{--expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index 6041bd2..0fdde08 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -16,6 +16,6 @@ define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ printf "%s\n" "info -title '$title' '$message'" buffer_content="$(mktemp ${TMPDIR:-/tmp}/fzf-buff-${kak_buffile##*/}.XXXXXX)" printf "%s\n" "execute-keys -draft %{%cat>$buffer_content;}" - printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content; rm $buffer_content)} %{--reverse | cut -f 1} %{execute-keys gx}" + printf "%s\n" "fzf -kak-cmd %{execute-keys} -items-cmd %{(nl -b a -n ln $buffer_content; rm $buffer_content)} -fzf-args %{--reverse | cut -f 1} -post-action %{execute-keys gx}" }} diff --git a/rc/fzf-modules/sk-grep.kak b/rc/fzf-modules/sk-grep.kak index b6ad557..78731e5 100644 --- a/rc/fzf-modules/sk-grep.kak +++ b/rc/fzf-modules/sk-grep.kak @@ -38,7 +38,7 @@ define-command -hidden fzf-sk-interactive-grep %{ evaluate-commands %sh{ [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" impl=$kak_opt_fzf_implementation printf "%s\n" "set-option global fzf_implementation \"sk -i -c '$kak_opt_fzf_sk_grep_command {}'\" - fzf %{fzf-sk-grep-handler} %{echo >/dev/null 2>&1} %{--expect ctrl-w $additional_flags} + fzf -kak-cmd %{fzf-sk-grep-handler} -items-cmd %{echo >/dev/null 2>&1} -fzf-args %{--expect ctrl-w $additional_flags} set-option global fzf_implementation $impl" }} diff --git a/rc/fzf.kak b/rc/fzf.kak index 6cea268..52c2801 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -123,13 +123,6 @@ fzf -shell-script-candidates %{echo "-kak-cmd\n-items-cmd\n-fzf-args\n-post-acti shift done - printf "echo -debug %%{kakoune_cmd: %s}\n" "'$kakoune_cmd'" - printf "echo -debug %%{items_cmd: %s}\n" "'$items_cmd'" - printf "echo -debug %%{fzf_args: %s}\n" "'$fzf_args'" - printf "echo -debug %%{post_action: %s}\n" "'$post_action'" - printf "echo -debug %%{preview: %s}\n" "'$preview'" - printf "echo -debug %%{ignored: %s}\n" "'$ignored'" - if [ "$preview" = "true" ] && [ ${kak_opt_fzf_preview} = "true" ]; then case ${kak_opt_fzf_highlight_cmd} in bat) highlight_cmd="bat --color=always --style=plain {}" ;;