diff --git a/rc/fzf.kak b/rc/fzf.kak index 338e6f6..1408abb 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -92,6 +92,9 @@ str fzf_terminal_command 'terminal kak -c %val{session} -e "%arg{@}"' declare-option -docstring "use main selection as default query for fzf if the selection is longer than 1 char." \ bool fzf_use_main_selection true +declare-option -docstring "Default options for fzf." \ +str fzf_default_opts '' + try %{ declare-user-mode fzf } define-command -hidden -docstring "wrapper command to create new vertical split" \ @@ -198,6 +201,7 @@ fzf -params .. %{ evaluate-commands %sh{ printf "%s\n" "SHELL=${shell_path}" fi # compose entire fzf command with all args into single file which will be executed later + printf "%s\n" "export FZF_DEFAULT_OPTS=\"$kak_opt_fzf_default_opts\"" printf "%s\n" "cd \"${PWD}\" && ${preview_position} ${items_cmd} ${fzf_impl} ${default_query} ${fzf_args} ${preview_cmd} ${filter} > ${result}" printf "%s\n" "rm ${fzfcmd}" ) >> ${fzfcmd}