Skip to content

Commit

Permalink
[Search Directory][Search Variables] sunset deprecated fzf opts varia…
Browse files Browse the repository at this point in the history
…bles
  • Loading branch information
PatrickF1 committed Nov 5, 2023
1 parent 82dd51e commit c5d1fe0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 7 additions & 0 deletions conf.d/fzf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions functions/_fzf_search_directory.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions functions/_fzf_search_variables.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5d1fe0

Please sign in to comment.