github.com/kaisawind/go-swagger@v0.19.0/docs/cli_helpers.md (about)

     1  ## CLI helpers
     2  
     3  #### Bash Completion
     4  
     5  Bash completion is supported and can be activated as follows:
     6  
     7  ```bash
     8  source ./cmd/swagger/completion/swagger.bash-completion
     9  ```
    10  
    11  Note that this does require you already setup bash completion,
    12  which can be done in 2 simple steps:
    13  
    14  1) install `bash-completion` using your favorite package manager;
    15  
    16  2) run `source /etc/bash_completion` in bash;
    17  
    18  #### Zsh Completion
    19  
    20  Zsh completion is supported and can be copied/soft-linked from:
    21  
    22  ```
    23  ./cmd/swagger/completion/swagger.zsh-completion
    24  ```
    25  
    26  In case you're new to adding auto-completion to zsh completion,
    27  here is how you could enable swagger's zsh completion step by step:
    28  
    29  1) create a folder used to store your completions (eg. `$HOME/.zsh/completion`);
    30  
    31  2) append the following to your `$HOME/.zshrc` file:
    32  
    33  ```zsh
    34  # add auto-completion directory to zsh's fpath
    35  fpath=($HOME/.zsh/completion $fpath)
    36  
    37  # compsys initialization
    38  autoload -U compinit
    39  compinit
    40  ```
    41  
    42  3) copy/soft-link `./cmd/swagger/completion/swagger.zsh-completion` to `$HOME/.zsh/completion/_swagger`;