Fixed! az.completion:10: command not found: complete

I was hanging out with a colleague earlier today (name drop: Burke Holland) and he roped me into fixing his terminal. He had the awful “az.completion:10: command not found: complete” error stuck in his zsh environment for around 8 months and I thought, “He can’t be the only one!” Enter: this blog post!

If you’re like Burke, simply open your .zshrc file and add the following line before sourcing az.completion:

To confirm, your az.completion section should now look like this:

That’s it! This is a known open issue on GitHub and is caused by using the curl method to install Az CLI when your default shell is set to zsh rather than bash.

Hope this helps!

Reminder: All of my posts are provided "AS IS", imply no warranties, and confer no rights or special privileges. Use of included postings, code samples and other works are subject to the terms specified at Microsoft. For more information, click here.

Leave a Reply

Your email address will not be published. Required fields are marked *