Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Jean-Yves Gastaud
Jean-Yves Gastaud

Posted on • Originally published atgastaud.io on

     

Azure-cli, active autocomplete in Zsh on Ubuntu.

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 inbash_completion.d directory.

In my setup, using Ubuntu 18.04, I found theazure-cli script in/etc/bash_completion.d/ directory.

Now we just need to load the autocomplete script inside our~/.zshrc with the following line:

source /etc/bash_completion.d/azure-cli

Save and reload your terminal. Done.

Additional notes

  • 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 calledaz, notazure-cli.

  • 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 forazure-cli oraz script and load it to your~/.bashrc file.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp