Documentation regarding the init-completion flag

This commit is contained in:
Antoine Eiche 2016-07-21 21:11:47 +02:00
parent 7640bef0eb
commit 34a8b004d2

View File

@ -794,10 +794,18 @@ func main() {
#### Enabling #### Enabling
Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while You can generate bash or zsh completion code by using the flag `--init-completion bash` or `--init-completion bash`.
setting the `PROG` variable to the name of your program:
`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete` To setup for bash:
```
eval "`myprogram --init-completion bash`"
```
Alternatively, you can put the completion code in your `.bashrc` file:
```
myprogram --init-completion bash >> ~/.bashrc
```
#### Distribution #### Distribution