invoke/completion/fish.completion
raw| 1 | # Invoke tab-completion script for the fish shell |
| 2 | # Copy it to the ~/.config/fish/completions directory |
| 3 | |
| 4 | function __complete_{binary} |
| 5 | {binary} --complete -- (commandline --tokenize) |
| 6 | end |
| 7 | |
| 8 | # --no-files: Don't complete files unless invoke gives an empty result |
| 9 | # TODO: find a way to honor all binary_names |
| 10 | complete --command {binary} --no-files --arguments '(__complete_{binary})' |