Documentation regarding the init-completion flag
This commit is contained in:
parent
7640bef0eb
commit
34a8b004d2
14
README.md
14
README.md
@ -794,10 +794,18 @@ func main() {
|
||||
|
||||
#### Enabling
|
||||
|
||||
Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
|
||||
setting the `PROG` variable to the name of your program:
|
||||
You can generate bash or zsh completion code by using the flag `--init-completion bash` or `--init-completion bash`.
|
||||
|
||||
`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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user