1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 07:13:53 -05:00

Fix fish subcommand completion

This allows subcommand style plugins to properly autocomplete.
Existing commands are not affected. 

Example, say you have support for `rbenv foo bar --flag`, then
this allows the last `--flag` argument to be properly completed.
This commit is contained in:
Max Nordlund
2017-02-10 09:12:30 +01:00
committed by GitHub
parent 4f8925abe7
commit 9f52b56aa8

View File

@@ -18,5 +18,6 @@ end
complete -f -c rbenv -n '__fish_rbenv_needs_command' -a '(rbenv commands)' complete -f -c rbenv -n '__fish_rbenv_needs_command' -a '(rbenv commands)'
for cmd in (rbenv commands) for cmd in (rbenv commands)
complete -f -c rbenv -n "__fish_rbenv_using_command $cmd" -a "(rbenv completions $cmd)" complete -f -c pyenv -n "__fish_pyenv_using_command $cmd" -a \
"(rbenv completions (commandline -opc)[2..-1])"
end end