You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to generate lazy loaded completion scripts for Bash and Zsh instead of having to eagerly register and execute them at shell startup by register-python-argcomplete. For Bash, it is likely the existing script can be used as is, for Zsh, you need #compdef <command> as the first line and to not call compdef but rather call the completion function directly, there is probably a trick or two to make the script work as both. I think click-completion uses one https://github.com/click-contrib/click-completion/blob/master/click_completion/zsh.j2, and also cobra https://github.com/spf13/cobra/blob/main/zsh_completions.go, but there are also others, not sure which is the best.
The text was updated successfully, but these errors were encountered:
It would be nice to be able to generate lazy loaded completion scripts for Bash and Zsh instead of having to eagerly register and execute them at shell startup by
register-python-argcomplete
. For Bash, it is likely the existing script can be used as is, for Zsh, you need#compdef <command>
as the first line and to not call compdef but rather call the completion function directly, there is probably a trick or two to make the script work as both. I think click-completion uses one https://github.com/click-contrib/click-completion/blob/master/click_completion/zsh.j2, and also cobra https://github.com/spf13/cobra/blob/main/zsh_completions.go, but there are also others, not sure which is the best.The text was updated successfully, but these errors were encountered: