Closed
Description
- Category
- fzf binary
- fzf-tmux script
- Key bindings
- Completion
- Vim
- Neovim
- Etc.
- OS
- Linux
- Mac OS X
- Windows
- Windows Subsystem for Linux
- Etc.
- Shell
- bash
- zsh
- fish
Steps to reproduce and behaviour
- Run
complete -F _fzf_path_completion -o default -o bashdefault fake_cmd
- Type
fake_cmd any_dir<TAB><TAB>
Now typing fake_cmd **<TAB><TAB>
stops working and returns default tab completion.
Root cause
In step 2. the completion function for fake_cmd is changed to bash' default - _minimal
.
Before step 2., complete | grep fake_cmd
outputs complete -F _fzf_path_completion -o default -o bashdefault fake_cmd
, but after step 2., the command outputs complete -F _minimal fake_cmd
.
This change happens, when _completion_loader
is run at:
Line 125 in 9615c4e
L125 affects all other commands, however the original completion function is restored later -
Lines 127 to 128 in 9615c4e
This restoration doesn't affect fake_cmd, because it is not in
a_cmds
: Line 265 in 9615c4e
Note that this if the fake_cmd
is inside /etc/bash_completion.d/
, then _completion_loader
doesn't fail, and the switch doesn't happen.