-
Notifications
You must be signed in to change notification settings - Fork 29
Azion CLI autocomplete
Please verify if you have autocomplete enabled globally, otherwise the autocomplete for cli will not work
You need to install zsh-autosuggestions
MacOs
brew install zsh-autosuggestions
Linux
git clone https://github.com/zsh-users/zsh-autosuggestions \${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Run
echo "autoload -U compinit; compinit" >> ~/.zshrc
Then run
echo "source <(azion completion zsh); compdef _azion azion" >> ~/.zshrc
If you uninstall azion cli, please edit your ~/.zshrc
file and remove the line source <(azion completion zsh); compdef _azion azion
Run
echo "autoload -U compinit; compinit" >> ~/.zshrc
Then open your ~/.zshrc
file, and add the following content to it
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
Open your ~/.zshrc
file and add the following content to it
plugins=(zsh-autosuggestions)
If you have other plugins, just add zsh-zutosuggestions to the end.
Whether you chose to activate autocomplete globally or for azion cli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal.
You need to install bash-completion
MacOs
brew install bash-completion
Centos/RHEL 7
yum install bash-completion bash-completion-extras
Debian/Ubuntu
apt-get install bash-completion
Alpine
apk add bash-completion
Run
echo "source <(azion completion bash)" >> ~/.bashrc
If you uninstall azion cli, please edit your ~/.bashrc
file and remove the line source <(azion completion bash)
Open your ~/.bashrc
file, and add the following content to it
BREW_PREFIX=$(brew --prefix)
[[ -r "${BREW_PREFIX}/etc/profile.d/bash_completion.sh" ]] && . ${BREW_PREFIX}/etc/profile.d/bash_completion.sh
Run
echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc
Whether you chose to activate autocomplete globally or for azion cli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal.
Run the command below once
echo "azion completion fish | source" >> ~/.config/fish/config.fish
If you uninstall azion cli, please edit your ~/.config/fish/config.fish
file and remove the line azion completion fish | source