Open flying-sausages opened 4 years ago
Please visit https://github.com/linux-china/cli-completion , and use cli-completion to generate completion for bash,zsh,fish by multpass.yaml
@linux-china does this allow for dynamic completions? Like introspecting output from a command to produce the available values for completion?
@flying-sausages, all - you can add this to your .zshrc
:
autoload bashcompinit
bashcompinit
source /Library/Application\ Support/com.canonical.multipass/Resources/completions/bash/multipass
Ah, but it won't work for multipass shell <TAB>...
:/
$ multipass shell _multipass_instances:11: command not found: _get_comp_words_by_ref
_multipass_instances:11: command not found: _get_comp_words_by_ref
_multipass_instances:11: command not found: _get_comp_words_by_ref
multipass shell
Hi there! I recently started working on zsh completion for multipass. You may track the progress at https://github.com/nikitastupin/incubator/blob/main/zsh/functions/_multipass. I will submit a Pull Request to this repository as soon as the file is more or less ready.
By the way, thanks for the multipass project! ❤️
What are you trying to do? Complete commands on ZSH, which is now default on MacOS and heavily used amongst powerusers.
What's your proposed solution? Create new file for ZSH completion
Additional context Compared to .bashrc, there is a lot of config management systems but they all agree on allowing user modifications to .zshrc