iagctl completion

Generate shell completion scripts.

The iagctl completion command outputs completion code for bash, zsh, or fish to enable interactive command completion in your shell.

Syntax

$iagctl completion [bash|zsh|fish]

Set up completion on macOS

If you’re using Bash on macOS, you first need to install bash-completion using Homebrew. Run bash --version to check your version, then follow the steps for your version below.

  1. Install bash-completion v1.x:
$ brew install bash-completion
  1. Enable bash-completion:
$ echo 'source $(brew --prefix)/etc/bash_completion' >> ~/.bash_profile
  1. Install the gateway completion script:
$ iagctl completion bash > $(brew --prefix)/etc/bash_completion.d/iagctl
With Bash 3.2, you need to run this command every time you update the gateway or switch your application mode to ensure you have the latest completion available.
  1. Reload your shell.

Set up completion on Linux

  1. Install bash-completion using your package manager:
$ # RHEL/CentOS
$ yum install bash-completion
$
$ # Debian/Ubuntu
$ apt-get install bash-completion
  1. Reload your shell and verify the installation:
$ type _init_completion

If this command fails, run:

$ echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc
  1. Install the gateway completion script:
$ echo 'source <(iagctl completion bash)' >> ~/.bashrc
  1. Reload your shell.

Set up completion for Zsh

  1. Install the gateway completion script:
$ echo 'source <(iagctl completion zsh)' >> ~/.zshrc
  1. Reload your shell.

Set up completion for Fish

  1. Install the gateway completion script:
$ echo 'iagctl completion fish | source' >> ~/.config/fish/config.fish
  1. Reload your shell.

Options

$ -h, --help Help for completion

Options inherited from parent commands

$ --config string Path to the configuration file
$ --raw Display the result of the command in raw format
$ --verbose Enable verbose output