CLI helpers #
Bash Completion #
Bash completion is supported and can be activated as follows:
source ./cmd/swagger/completion/swagger.bash-completion
Note that this does require you already setup bash completion, which can be done in 2 simple steps:
- install
bash-completion
using your favorite package manager; - run
source /etc/bash_completion
in bash;
Zsh Completion #
Zsh completion is supported and can be copied/soft-linked from:
./cmd/swagger/completion/swagger.zsh-completion
In case you’re new to adding auto-completion to zsh completion, here is how you could enable swagger’s zsh completion step by step:
- create a folder used to store your completions (eg.
$HOME/.zsh/completion
); - append the following to your
$HOME/.zshrc
file:
# add auto-completion directory to zsh's fpath
fpath=($HOME/.zsh/completion $fpath)
# compsys initialization
autoload -U compinit
compinit
- copy/soft-link
./cmd/swagger/completion/swagger.zsh-completion
to$HOME/.zsh/completion/_swagger
;