Out of the box, Azure-cli doesn't have autocomplete activated in Zsh and Oh-My-Zsh framework doesn't have plugin available natively.
However, Azure-cli comes with an autocomplete script that should be located in
In my setup, using Ubuntu 18.04, I found the
azure-cli script in
Now we just need to load the autocomplete script inside our
~/.zshrc with the following line:
Save and reload your terminal. Done.
- If you encounter an error when restarting, you may have to add that line before the script loading to ensure cross compatibility between bash and zsh script
autoload -U +X bashcompinit && bashcompinit
Looking at different blog post, you may find that the script is called
According to the directory I found it, the script was natively loaded if I use bash shell. If you use bash and doesn't have autocomplete activate, you probably have to search for
azscript and load it to your