Enabling shell autocompletion for IBM Cloud CLI (Linux and macOS only)
Starting from version 0.7.0, the IBM Cloud® Command Line Interface installers don't enable shell autocompletion automatically. To have the autocompletion support, you need to manually enable it. The autocompletion scripts are installed
in the following locations:
Bashautocompletion:/usr/local/ibmcloud/autocomplete/bash_autocompleteZshautocompletion:/usr/local/ibmcloud/autocomplete/zsh_autocomplete
Enabling autocompletion for Linux
-
If you're using
Bash, add:[[ -f /usr/local/ibmcloud/autocomplete/bash_autocomplete ]] && source /usr/local/ibmcloud/autocomplete/bash_autocompleteinto one of the following files: -
For Login shell:
~/.bash_profile -
For Nonlogin shell:
~/.bashrc -
If you're using
Zsh: add:source /usr/local/ibmcloud/autocomplete/zsh_autocompleteinto~/.zshrc.
Enabling autocompletion support for macOS
-
If you're using
Bash, add:source /usr/local/ibmcloud/autocomplete/bash_autocompleteinto~/.bash_profile. -
If you're using
Zsh, add:source /usr/local/ibmcloud/autocomplete/zsh_autocompleteinto~/.zshrc.