Document Bash completion setup
This commit is contained in:
@@ -168,3 +168,17 @@ go run ./examples/core workspace greet --count=0 --tag=first --tag second
|
||||
|
||||
The [consumer guide](consumers/guide.md) explains how their public API usage
|
||||
fits together.
|
||||
|
||||
|
||||
## Shell completion validation
|
||||
|
||||
The opt-in interactive completion checks require Bash, Zsh, Fish, Python with
|
||||
`pexpect`, and the Bash completion package. The harness starts a clean Bash
|
||||
and sources `/usr/share/bash-completion/bash_completion` by default. Set
|
||||
`COMPLETION_BASH_INIT` to your installation's initialization file if it is
|
||||
elsewhere. See the [operator setup](cli.md#shell-completion) for ordinary use.
|
||||
|
||||
```sh
|
||||
COMMANDKIT_COMPLETION_SHELLS=1 go test -count=1 -run '^TestCompletionShells$' ./internal/cobra
|
||||
COMMANDKIT_COMPLETION_SHELLS=1 go test -count=1 -run '^TestCompletionConsumerInShells$' .
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user