Skip to content

Set up shell completion

Generate a shell completion script so gskill commands tab-complete in your shell. Bash, Zsh, and Fish are supported.

  • GSKILL installed and on your PATH.
Terminal window
gskill completion bash # prints a bash completion script
gskill completion zsh # prints a zsh completion script
gskill completion fish # prints a fish completion script

gskill completion writes the script to stdout — redirect or source it for your shell.

Bash (Linux):

Terminal window
gskill completion bash | sudo tee /etc/bash_completion.d/gskill > /dev/null

Bash (macOS, with Homebrew bash-completion):

Terminal window
gskill completion bash > "$(brew --prefix)/etc/bash_completion.d/gskill"

Zsh — place it on your fpath:

Terminal window
gskill completion zsh > "${fpath[1]}/_gskill"

Fish:

Terminal window
gskill completion fish > ~/.config/fish/completions/gskill.fish

Open a new shell afterwards.

  • The chosen shell tab-completes gskill subcommands. gskill completion itself exits 0.