I've found hints at there being command completion available for bash[1] for the Azure CLI (az
command), but I have not found any indication on how to install/enable that for zsh. Anyone know how to do that, if it is possible? I use oh-my-zsh, if that is relevant.
It is possible to have completions for az
in zsh.
Get the completions for bash from the Azure CLI git repo and store this file somewhere your zsh startup script can find it: https://raw.githubusercontent.com/Azure/azure-cli/dev/az.completion
Enable bash autocompletions in zsh (if it's not enabled already) [1]:
autoload -U +X bashcompinit && bashcompinit
az
: source /path/to/az.completion
The code snippets from step 2 and 3 can be added to a shell startup file (.zshrc
or similar) to make the changes permanent.