Set up shell completion
Generate a shell completion script so gskill commands tab-complete in your shell. Bash, Zsh, and
Fish are supported.
Before you start
Section titled “Before you start”- GSKILL installed and on your
PATH.
Generate the script
Section titled “Generate the script”gskill completion bash # prints a bash completion scriptgskill completion zsh # prints a zsh completion scriptgskill completion fish # prints a fish completion scriptgskill completion writes the script to stdout — redirect or source it for your shell.
Install it
Section titled “Install it”Bash (Linux):
gskill completion bash | sudo tee /etc/bash_completion.d/gskill > /dev/nullBash (macOS, with Homebrew bash-completion):
gskill completion bash > "$(brew --prefix)/etc/bash_completion.d/gskill"Zsh — place it on your fpath:
gskill completion zsh > "${fpath[1]}/_gskill"Fish:
gskill completion fish > ~/.config/fish/completions/gskill.fishOpen a new shell afterwards.
Expected result
Section titled “Expected result”- The chosen shell tab-completes
gskillsubcommands.gskill completionitself exits0.