Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Tab completion for zsh / tcsh / fish #3436

Open
hartmutobendorf opened this issue Mar 14, 2024 · 1 comment
Open

[cli] Tab completion for zsh / tcsh / fish #3436

hartmutobendorf opened this issue Mar 14, 2024 · 1 comment

Comments

@hartmutobendorf
Copy link

Describe the bug
Tab completion on Ubuntu only works for bash.

To Reproduce
How, and what happened?

  1. zsh
  2. multipass <TAB>
  3. 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

@hartmutobendorf hartmutobendorf added bug needs triage Issue needs to be triaged labels Mar 14, 2024
@georgeliao
Copy link
Contributor

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.

@townsend2010 townsend2010 removed the needs triage Issue needs to be triaged label Mar 18, 2024
@townsend2010 townsend2010 changed the title Tab completion for zsh / tcsh / fish [cli] Tab completion for zsh / tcsh / fish Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants