Octopus Deploy Documentation

Install autocomplete

Last updated

Install a shell auto-complete script into your shell profile, if they aren't already there. Supports pwsh, zsh, bash, and PowerShell.

install-autocomplete options

Install a shell auto-complete script into your shell profile, if they aren't already there. Supports pwsh, zsh, bash & powershell.

Usage: octo install-autocomplete [<options>]

Where [<options>] is any of:

Install AutoComplete:

      --shell=VALUE          The type of shell to install auto-complete
                             scripts for. This will alter your shell
                             configuration files. Supported shells are Bash,
                             Powershell, Pwsh and Zsh.
      --dryRun               [Optional] Dry run will output the proposed
                             changes to console, instead of writing to disk.

Common options:

      --help                 [Optional] Print help for a command.
      --helpOutputFormat=VALUE
                             [Optional] Output format for help, valid options
                             are Default or Json

Tab completion for commands and options

Tab completion is available for the following shell environments: powershell, pwsh (PowerShell Core), bash & zsh. This feature requires that octo or Octo is available from your $PATH, which is the default state if installed via a package manager or Chocolatey. If you've manually installed the CLI, please ensure your $PATH is also updated if you wish to use this feature. This is an optional feature that requires additional installation steps on a per user basis, since this feature relies on built-in shell auto completion facilities.

Additional installation steps for tab completion.

  1. Check that octo is available on your path:
which octo

This should return a valid location on your path like /usr/bin/octo.

  1. Install tab completion scripts into your profile, choosing from powershell, pwsh, bash or zsh:
octo install-autocomplete --shell zsh

Tips:

  • If you're using PowerShell on Windows use powershell. If you're using PowerShell Core on Windows, Mac or Linux, use pwsh.
  • You can review changes to your profile without writing to disk by using the --dryRun option:
octo install-autocomplete --shell powershell --dryRun
  1. Either restart your shell environment or 'dot source' your profile:
. ~/.bashrc
. ~/.zshrc
. $PROFILE
  1. You can now discover sub-commands by typing octo [searchterm] and hitting the [tab] key. If you don't provide a search term, the full list of available sub-commands will be shown.

animation showing the tab completion feature in Zsh to list all environments in the default space

Need support? We're here to help.