docs: Add shell completion installation instructions (gt-pdrh0)
Document bash/zsh/fish completion setup in README. Cobra provides `gt completion <shell>` out of the box. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
30
README.md
30
README.md
@@ -250,6 +250,36 @@ gt doctor # Health check
|
|||||||
gt doctor --fix # Auto-repair
|
gt doctor --fix # Auto-repair
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Shell Completions
|
||||||
|
|
||||||
|
Enable tab completion for `gt` commands:
|
||||||
|
|
||||||
|
### Bash
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add to ~/.bashrc
|
||||||
|
source <(gt completion bash)
|
||||||
|
|
||||||
|
# Or install permanently
|
||||||
|
gt completion bash > /usr/local/etc/bash_completion.d/gt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Zsh
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add to ~/.zshrc (before compinit)
|
||||||
|
source <(gt completion zsh)
|
||||||
|
|
||||||
|
# Or install to fpath
|
||||||
|
gt completion zsh > "${fpath[1]}/_gt"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fish
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gt completion fish > ~/.config/fish/completions/gt.fish
|
||||||
|
```
|
||||||
|
|
||||||
## Roles
|
## Roles
|
||||||
|
|
||||||
| Role | Scope | Job |
|
| Role | Scope | Job |
|
||||||
|
|||||||
Reference in New Issue
Block a user