diff --git a/.bash_completion b/.bash_completion index daa5a4d..5fb1dac 100644 --- a/.bash_completion +++ b/.bash_completion @@ -11,6 +11,16 @@ complete -W '--force' dotfiles-install dotfiles-update complete -W '--quieter' generate-shell-completions +# Fuzzy completion with the `**` trigger +# (e.g., `vi **`, `ssh **`) +# +# Must be sourced before `complete_alias` below, +# which then saves fzf's wrappers as the vanilla completions +if [ -r /usr/share/doc/fzf/examples/completion.bash ]; then + . /usr/share/doc/fzf/examples/completion.bash +fi + + # Automagical completion for all ~/.config/shell/aliases # # See: https://github.com/cykerway/complete-alias diff --git a/.bashrc b/.bashrc index f741755..5cb62c2 100644 --- a/.bashrc +++ b/.bashrc @@ -98,8 +98,5 @@ if [ -r /usr/share/doc/fzf/examples/key-bindings.bash ]; then . /usr/share/doc/fzf/examples/key-bindings.bash fi -# Fuzzy completion with the `**` trigger -# (e.g., `vi **`, `ssh **`) -if [ -r /usr/share/doc/fzf/examples/completion.bash ]; then - . /usr/share/doc/fzf/examples/completion.bash -fi +# Fuzzy completion with the `**` trigger (e.g., `vi **`, `ssh **`) +# is set up in ~/.bash_completion, so that it is loaded before `complete_alias`