diff --git a/README.md b/README.md index 9477cf2..8616cb6 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ configurations below. ### Windowing If you're using Tmux, you do not have to worry about windowing, since fzf.kak automatically creates all needed Tmux splits and panes for you. However in case -you're not using Tmux, fzf.kak uses `fzf_terminal_cmd` option to call windowing +you're not using Tmux, fzf.kak uses `fzf_terminal_command` option to call windowing command to create new windows. By default it is set to use `terminal` alias: `terminal kak -c %val{session} -e "%arg{@}"`, but some terminals can provide other aliases or commands, like `terminal-tab` in Kitty. You may want to edit @@ -180,7 +180,7 @@ option to `false`. #### Highlighting preview window You also can highlight contents of the file displayed within preview window. To -do so, you can specify which highlighter to use with `fzf_highlight_cmd` option. +do so, you can specify which highlighter to use with `fzf_highlight_command` option. Supported highlighters are: * [Bat][16] diff --git a/rc/fzf.kak b/rc/fzf.kak index 9f237d3..391b145 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -57,7 +57,7 @@ These are default arguments for the tools above: highlight: "highlight --failsafe -O ansi {}" rouge: "rougify {}" ' \ -str fzf_highlight_cmd "highlight" +str fzf_highlight_command "highlight" declare-option -docstring "height of fzf tmux split in screen lines or percents. Default value: 25%%" \ @@ -87,7 +87,7 @@ str fzf_horizontal_map 'ctrl-s' declare-option -docstring 'command to use to create new window when not using tmux. Default value: terminal kak -c %val{session} -e "%arg{@}"' \ -str fzf_terminal_cmd 'terminal kak -c %val{session} -e "%arg{@}"' +str fzf_terminal_command 'terminal kak -c %val{session} -e "%arg{@}"' try %{ declare-user-mode fzf } @@ -106,7 +106,7 @@ fzf-window -params .. %{ evaluate-commands %sh{ if [ -n "$kak_client_env_TMUX" ]; then printf "%s\n" 'tmux-terminal-window kak -c %val{session} -e "%arg{@}"' else - printf "%s\n" "$kak_opt_fzf_terminal_cmd" + printf "%s\n" "$kak_opt_fzf_terminal_command" fi }} @@ -167,12 +167,12 @@ fzf -params .. %{ evaluate-commands %sh{ # handle preview if not defined explicitly with `-preview-cmd' if [ ${kak_opt_fzf_preview} = "true" ] && [ -z "${preview_cmd}" ]; then - case ${kak_opt_fzf_highlight_cmd} in + case ${kak_opt_fzf_highlight_command} in (bat) highlight_cmd="bat --color=always --style=plain {}" ;; (coderay) highlight_cmd="coderay {}" ;; (highlight) highlight_cmd="highlight --failsafe -O ansi {}" ;; (rouge) highlight_cmd="rougify {}" ;; - (*) highlight_cmd="${kak_opt_fzf_highlight_cmd}" ;; + (*) highlight_cmd="${kak_opt_fzf_highlight_command}" ;; esac preview_cmd="--preview '(${highlight_cmd} || cat {}) 2>/dev/null | head -n ${kak_opt_fzf_preview_lines}' --preview-window=\${pos}" fi @@ -204,7 +204,7 @@ fzf -params .. %{ evaluate-commands %sh{ # `terminal' doesn't support any kind of width and height parameters, so tmux panes are created by tmux itself cmd="nop %sh{ command tmux split-window ${measure} ${tmux_height%%%*} '${fzfcmd}' }" else - cmd="${kak_opt_fzf_terminal_cmd%% *} %{${fzfcmd}}" + cmd="${kak_opt_fzf_terminal_command%% *} %{${fzfcmd}}" fi printf "%s\n" "${cmd}" diff --git a/rc/modules/fzf-cd.kak b/rc/modules/fzf-cd.kak index e39e201..4b75a45 100644 --- a/rc/modules/fzf-cd.kak +++ b/rc/modules/fzf-cd.kak @@ -24,7 +24,7 @@ declare-option -docstring 'command to show list of directories in preview window Default value: tree -d ' \ -str cd_preview_cmd "tree -d {}" +str cd_preview_command "tree -d {}" declare-option -docstring 'maximum amount of previewed directories' \ int fzf_preview_dirs '300' @@ -43,7 +43,7 @@ current path: $(pwd)}" esac if [ "$kak_opt_fzf_cd_preview" = "true" ]; then preview_flag="-preview" - preview="--preview '($kak_opt_cd_preview_cmd) 2>/dev/null | head -n $kak_opt_fzf_preview_dirs'" + preview="--preview '($kak_opt_cd_preview_command) 2>/dev/null | head -n $kak_opt_fzf_preview_dirs'" fi printf "%s\n" "fzf $preview_flag -kak-cmd %{change-directory} -items-cmd %{$items_command} -preview-cmd %{$preview} -post-action %{fzf-cd}" }}