diff --git a/docs-ref-conceptual/includes/cli-install-linux-apt.md b/docs-ref-conceptual/includes/cli-install-linux-apt.md index d53cbbd4db..a26ec4e4a0 100644 --- a/docs-ref-conceptual/includes/cli-install-linux-apt.md +++ b/docs-ref-conceptual/includes/cli-install-linux-apt.md @@ -237,3 +237,5 @@ If your proxy doesn't use basic auth, __remove__ the `[username]:[password]@` po In order to get the Microsoft signing key and get the package from our repository, your proxy needs to allow HTTPS connections to the following address: `https://packages.microsoft.com. [!INCLUDE[troubleshoot-wsl.md](troubleshoot-wsl.md)] + +[!INCLUDE[linux-completion.md](linux-completion.md)] diff --git a/docs-ref-conceptual/includes/cli-install-linux-dnf.md b/docs-ref-conceptual/includes/cli-install-linux-dnf.md index f1265f62cf..f9d62a96c6 100644 --- a/docs-ref-conceptual/includes/cli-install-linux-dnf.md +++ b/docs-ref-conceptual/includes/cli-install-linux-dnf.md @@ -193,3 +193,5 @@ allow HTTPS connections to the following address: * `https://packages.microsoft.com` [!INCLUDE[troubleshoot-wsl.md](troubleshoot-wsl.md)] + +[!INCLUDE[linux-completion.md](linux-completion.md)] diff --git a/docs-ref-conceptual/includes/cli-install-linux-tdnf.md b/docs-ref-conceptual/includes/cli-install-linux-tdnf.md index 30b84102b9..fba1977b22 100644 --- a/docs-ref-conceptual/includes/cli-install-linux-tdnf.md +++ b/docs-ref-conceptual/includes/cli-install-linux-tdnf.md @@ -61,3 +61,7 @@ sudo tdnf remove azure-cli ### Remove data [!INCLUDE [remove-data-boilerplate.md](remove-data-boilerplate.md)] + +## Troubleshooting + +[!INCLUDE[linux-completion.md](linux-completion.md)] diff --git a/docs-ref-conceptual/includes/linux-completion.md b/docs-ref-conceptual/includes/linux-completion.md new file mode 100644 index 0000000000..6fe4104451 --- /dev/null +++ b/docs-ref-conceptual/includes/linux-completion.md @@ -0,0 +1,20 @@ +--- +author: bebound +ms.author: hanglei +ms.date: 11/29/2024 +ms.topic: include +--- +### Completion isn't working + +For Bash users, the completion script is installed in `/etc/bash_completion.d/azure-cli`. If it is not automatically executed, add the following line to your `~/.bashrc` file, then save and reload your Bash profile: + +```bash +source /etc/bash_completion.d/azure-cli +``` + +For Zsh users, add the following two lines in your `~/.zshrc` file, then save and reload your Zsh profile: + +```zsh +autoload -U +X bashcompinit && bashcompinit +source /etc/bash_completion.d/azure-cli +``` diff --git a/docs-ref-conceptual/install-azure-cli-macos.md b/docs-ref-conceptual/install-azure-cli-macos.md index d9d9e571a5..2a8357d426 100644 --- a/docs-ref-conceptual/install-azure-cli-macos.md +++ b/docs-ref-conceptual/install-azure-cli-macos.md @@ -38,7 +38,7 @@ If you encounter a problem when installing the CLI through Homebrew, here are so ### Completion isn't working -The Homebrew formula of Azure CLI installs a completion file named `az` in the Homebrew-managed completions directory (default location is `/usr/local/etc/bash_completion.d/`). To enable completion, follow Homebrew's instructions [here](https://docs.brew.sh/Shell-Completion). +The Homebrew formula of Azure CLI installs a completion file named `az` in the Homebrew-managed completions directory (default location is `$(brew --prefix)/etc/bash_completion.d/`). To enable completion, follow Homebrew's instructions [here](https://docs.brew.sh/Shell-Completion). For Zsh, add the following two lines to the bottom of your `.zshrc` file, then save and reload your Zsh profile.