Add shell completion

This commit is contained in:
2026-07-28 20:31:44 +02:00
parent ef32aa473e
commit e89c524438
5 changed files with 371 additions and 16 deletions

View File

@@ -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