Skip to content

Commit

Permalink
add migration message on update
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickF1 committed May 29, 2021
1 parent 1db5203 commit a6831e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions conf.d/fzf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ function _fzf_uninstall --on-event fzf_uninstall
echo "fzf.fish uninstalled"
set_color normal
end

function _fzf_migration_message --on-event fzf_update
set_color --italics cyan
printf '\n%s\n' 'If you last updated fzf.fish before June 2021 and use custom key bindings, you may need to migrate them.'
printf '%s\n\n' 'Check out https://github.com/PatrickF1/fzf.fish/wiki/Migration-guides#v70.'
set_color normal

end
6 changes: 1 addition & 5 deletions functions/__fzf_search_shell_variables.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
function __fzf_search_shell_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable."
# inform users who use custom key bindings of the backwards incompatible change
if test -z "$set_names_output"
set_color red
printf '\n%s\n' '__fzf_search_shell_variables now requires arguments so you have to update your key bindings.' >&2
printf '%s\n\n' 'Please see github.com/PatrickF1/fzf.fish/releases/tag/v5.0 for the resolution.' >&2
set_color normal

printf '%s\n' '__fzf_search_shell_variables requires 2 arguments.' >&2
commandline --function repaint
return 22 # 22 means invalid argument in POSIX
end
Expand Down

0 comments on commit a6831e7

Please sign in to comment.