Add shell completion
This commit is contained in:
23
README.md
23
README.md
@@ -59,6 +59,29 @@ diple --repo owner/repository \
|
||||
--endpoint https://github.example.com/api/graphql
|
||||
```
|
||||
|
||||
## Shell completion
|
||||
|
||||
`diple` generates completion scripts without contacting GitHub or loading the
|
||||
configuration. Choose the command for your shell:
|
||||
|
||||
```sh
|
||||
# Bash: current session
|
||||
source <(diple completion bash)
|
||||
|
||||
# Zsh: current session
|
||||
source <(diple completion zsh)
|
||||
|
||||
# Fish: install for the current user
|
||||
diple completion fish > ~/.config/fish/completions/diple.fish
|
||||
```
|
||||
|
||||
For persistent Bash completion, write the generated output to a directory
|
||||
loaded by your distribution's `bash-completion` package. For persistent Zsh
|
||||
completion, write it to a file named `_diple` in a directory on `$fpath`, then
|
||||
run `compinit`. `diple completion --help` lists the supported shells, while
|
||||
`diple --help` shows grouped command-line options, defaults, configuration
|
||||
precedence, and authentication behavior.
|
||||
|
||||
## Configuration
|
||||
|
||||
The optional TOML configuration is loaded from
|
||||
|
||||
Reference in New Issue
Block a user