feat: add --generate-completion for shell tab completion
- Add clap_complete dependency for bash/zsh/fish/elvish/powershell - Add --generate-completion <shell> flag that prints completion script to stdout - profile.bash sources completions via command keep --generate-completion bash - @ and @@ aliases get completions via wrapper functions that delegate to _keep - README updated with Shell Completion section
This commit is contained in:
18
README.md
18
README.md
@@ -90,6 +90,24 @@ source $KEEP_BASH_PROFILE
|
||||
|
||||
The modulefile prepends `keep/bin` to `PATH` and sets `KEEP_BASH_PROFILE` pointing to `profile.bash`.
|
||||
|
||||
### Shell Completion
|
||||
|
||||
Tab completion is available for `bash`, `zsh`, `fish`, `elvish`, and `powershell`.
|
||||
|
||||
**Bash** — add to `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
. <(keep --generate-completion bash)
|
||||
```
|
||||
|
||||
**Zsh** — add to `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
. <(keep --generate-completion zsh)
|
||||
```
|
||||
|
||||
**With `profile.bash`**: Completions for `keep`, `@` (save), and `@@` (get) are loaded automatically when sourcing `profile.bash`.
|
||||
|
||||
### Build with Server/Client Features
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user