From c5d1fe0b8568064645855f76328a0f3b5ac944a7 Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sun, 5 Nov 2023 11:47:21 -0800 Subject: [PATCH] [Search Directory][Search Variables] sunset deprecated fzf opts variables --- conf.d/fzf.fish | 7 +++++++ functions/_fzf_search_directory.fish | 3 +-- functions/_fzf_search_variables.fish | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conf.d/fzf.fish b/conf.d/fzf.fish index 8156c11b..9f062f4b 100644 --- a/conf.d/fzf.fish +++ b/conf.d/fzf.fish @@ -26,3 +26,10 @@ function _fzf_uninstall --on-event fzf_uninstall echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." set_color normal end + +function _fzf_migration_message --on-event fzf_update + set_color FF8C00 # dark orange + printf '\n%s\n' '[fzf.fish] Breaking change: if you have $fzf_dir_opts or $fzf_shell_vars_opts set in your environment, rename them to $fzf_directory_opts and $fzf_variables_opts respectively.' + printf '%s\n\n' 'See https://github.com/PatrickF1/fzf.fish/wiki/Migration-Guides#v10.1.' + set_color normal +end diff --git a/functions/_fzf_search_directory.fish b/functions/_fzf_search_directory.fish index ad30a303..c09f90b3 100644 --- a/functions/_fzf_search_directory.fish +++ b/functions/_fzf_search_directory.fish @@ -5,8 +5,7 @@ function _fzf_search_directory --description "Search the current directory. Repl set -f fd_cmd (command -v fdfind || command -v fd || echo "fd") set -f --append fd_cmd --color=always $fzf_fd_opts - # $fzf_dir_opts is the deprecated version of $fzf_directory_opts - set -f fzf_arguments --multi --ansi $fzf_dir_opts $fzf_directory_opts + set -f fzf_arguments --multi --ansi $fzf_directory_opts set -f token (commandline --current-token) # expand any variables or leading tilde (~) in the token set -f expanded_token (eval echo -- $token) diff --git a/functions/_fzf_search_variables.fish b/functions/_fzf_search_variables.fish index bf823403..c9a2e31e 100644 --- a/functions/_fzf_search_variables.fish +++ b/functions/_fzf_search_variables.fish @@ -27,8 +27,7 @@ function _fzf_search_variables --argument-names set_show_output set_names_output --preview-window="wrap" \ --multi \ --query=$cleaned_curr_token \ - # $fzf_shell_vars_opts is the deprecated version of $fzf_variables_opts - $fzf_shell_vars_opts $fzf_variables_opts + $fzf_variables_opts ) if test $status -eq 0