iagctl completion

Prev Next

Outputs code for bash, zsh, or fish to support interactive completion.

Bash

MacOS

If using bash on macOS, you 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. When you use Bash 3.2, you have to run the following command every time you update your 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, run:

echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc

Next, 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 the gateway 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

Learn more

For all CLI commands, see Command reference.