From 1e1221883b85beebb1e89caee51540e846c4c240 Mon Sep 17 00:00:00 2001 From: max Date: Fri, 2 Jan 2026 17:14:47 -0800 Subject: [PATCH] docs: Add shell completion installation instructions (gt-pdrh0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document bash/zsh/fish completion setup in README. Cobra provides `gt completion ` out of the box. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 005e9809..933d5a5a 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,36 @@ gt doctor # Health check 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 | Role | Scope | Job |