“az
” autocomplete command from azure-cli package do not work by default. By autocomplete I understand the functionality where command can populate additional options by pressing <TAB> button twice.
In zsh 5.8.1 (macOS ver. 12.6.1) to make it work, create the following file in your home directory: “.zshrc” with the content:
autoload bashcompinit && bashcompinit &&
autoload compinit && compinit
source /usr/local/etc/bash_completion.d/az
Assumption is that you have installed az with the brew: brew update && brew install azure-cli
az binary are then in /usr/local/bin/az
, and autocompletion file in /usr/local/etc/bash_completion.d/az
This functionality do not work for az extensions. For example, vmware extension needs to be typed (az vmware), but then subcommands are autocomplete and everything works as expected.
I believe autocomplete was one of the main features that makes Linux shell (bash in particular) so popular. Everyone appreciate the fact that there is no need to remember every command option by hard. And also, less typing means more works can be done 🙂
No Comments