Zsh integration for the snap command?

I see there’s no built-in completion for the snap command in zsh, nor in the standard autocomplete library (zsh-completions). Is there a way to get autocompletion for the snap command in zsh?

My operating system is Arch Linux, and I built & installed Snap using the snap package from the AUR.

Someone would have to write it. I have briefly tried to use the bash completion files in zsh with bash compatibility loaded, but with no success. You can try that yourself:

$ autoload -U +X bashcompinit && bashcompinit
$ source /usr/share/bash-completion/completions/snap
$ snap <tab>

If you feel like contributing the completion support, or make the bash one compatible with zsh, that’d be great.

1 Like