multipass
multipass copied to clipboard
[cli] Tab completion for zsh / tcsh / fish
Describe the bug Tab completion on Ubuntu only works for bash.
To Reproduce How, and what happened?
-
zsh
-
multipass <TAB>
- lists directory contents
Expected behavior show commands like for bash
I would suggest adding completion scripts for zsh, tcsh and fish. https://snapcraft.io/docs/tab-completion suggests this is possible referencing https://github.com/snapcore/snapd/blob/master/data/completion/bash/complete.sh
Hi @hartmutobendorf
Thanks for pointing this out. Indeed, multipass tab completion is only supported on bash and not on zsh. Being able to do that on zsh definitely can be a good enhancement. As to how to do that, I have a quick look at the documentation you suggested, it looks like the completion.sh
can refer to the bash completion file and reuse that. This can be one way and a quick way to do it if it works as expected. However, it only fixes it on Linux and the macos probably will need a standard zsh completion script.
Anyway, we need to have a discussion within the team regarding how to do it and when we can do it.
Thanks a lot for the advice.