- 12 Nov 2024
-
DarkLight
-
PDF
completion
- Updated on 12 Nov 2024
-
DarkLight
-
PDF
iagctl completion
Generate shell completion scripts for bash, zsh, fish
Synopsis
Outputs code for bash
, zsh
or fish
to support interactive completion. Refer to the appropriate section below based on your operating system/shell.
Bash
MacOS
If using bash on macOS you will first need to install bash-completion
using Homebrew.
Run bash --version
to check if you are using either bash 3.2 or 4.1+. Refer to the appropriate section below based on your bash version.
Bash 3.2
Install bash-completion v1.x.
brew install bash-completion
Enable bash-completion.
echo 'source $(brew --prefix)/etc/bash_completion' >> ~/.bash_profile
Install the gateway
completion script. While using Bash 3.2, you have to run this command every time you update gateway or switch your application mode to always ensure you have the latest completion
available.
iagctl completion bash > $(brew --prefix)/etc/bash_completion.d/iagctl
Reload the shell.
Bash 4.1
Install bash-completion v2.x.
brew install bash-completion@2
Enable bash-completion.
echo 'brew_etc="$(brew --prefix)/etc" \
&& [[ -r "${brew_etc}/profile.d/bash_completion.sh" ]] \
&& . "${brew_etc}/profile.d/bash_completion.sh"' >> ~/.bash_profile
Install the gateway completion script.
echo 'source <(iagctl completion bash)' >> ~/.bash_profile
Reload the shell.
Linux
If using Bash on Linux, install bash-completion using your package manager. For example:
yum install bash-completion
apt-get install bash-completion
Reload the shell and run:
type _init_completion
If the command fails, you will also need to run:
echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc
Next, you will need to run:
echo 'source <(iagctl completion bash)' >> ~/.bashrc
Reload the shell.
Zsh
To install the gateway
completion script on zsh
, run the following:
echo 'source <(iagctl completion zsh)' >> ~/.zshrc
Reload the shell.
Fish
To install gateway's completion script on Fish
, run the following:
echo 'iagctl completion fish | source' >> ~/.config/fish/config.fish
Reload the shell.
iagctl completion [bash|zsh|fish]
Options
-h, --help help for completion
Options Inherited from Parent Commands
--config string Path to the configuration file
--raw Displays the result of the command in its raw format
--verbose Enable verbose output
CLI References
For all CLI commands see → Command References Index