LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

doctl-completion

generate shell autocompletion scripts for doctl

TLDR

Generate Bash completion and load it in the current session
$ source <(doctl completion bash)
copy
Generate Zsh completion and load it in the current session
$ source <(doctl completion zsh)
copy
Generate fish completion
$ doctl completion fish
copy
Generate PowerShell completion
$ doctl completion powershell
copy
Install Bash completion into the shell profile
$ echo 'source <(doctl completion bash)' >> ~/.bashrc
copy

SYNOPSIS

doctl completion shell

DESCRIPTION

doctl completion prints a shell autocompletion script for doctl. Source the output in your shell startup file so tab completion works for commands, subcommands, and flags.On Linux, a typical setup is `source <(doctl completion bash)` in `~/.bashrc` (or the `zsh`/`fish` equivalent). Homebrew installs of doctl often ship completion files automatically, though the shell still has to load them.This command does not modify files; it only writes the script to stdout.

PARAMETERS

SHELL

Target shell. Valid values: `bash`, `zsh`, `fish`, `powershell`.
bash
Print a Bash completion script on stdout.
zsh
Print a Zsh completion script on stdout.
fish
Print a fish completion script on stdout.
powershell
Print a PowerShell completion script on stdout.
--help, -h
Display help for this command.

INSTALL

sudo dnf install doctl
copy
sudo pacman -S doctl
copy
sudo apk add doctl
copy
brew install doctl
copy
nix profile install nixpkgs#doctl
copy

CAVEATS

Bash completion needs the bash-completion framework. Homebrew-generated completions may already be installed separately from this command. PowerShell and Windows support is limited compared with Unix shells. The generated script must be regenerated after upgrading doctl if new commands were added.

SEE ALSO

doctl(1), bash(1), zsh(1), fish(1)

RESOURCES

Copied to clipboard
Kai