Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 1.2 KB

File metadata and controls

68 lines (45 loc) · 1.2 KB

Shell Completion

ggcode provides built-in shell completion powered by Cobra. No external tools are needed.

Install

bash

Add to ~/.bashrc:

source <(ggcode completion bash)

For persistent completion file installation:

ggcode completion bash > /etc/bash_completion.d/ggcode

zsh

Add to ~/.zshrc:

source <(ggcode completion zsh)

If you get "compinit" errors, ensure the completion directory is in fpath:

ggcode completion zsh > "${fpath[1]}/_ggcode"

fish

Write to the fish completions directory:

ggcode completion fish > ~/.config/fish/completions/ggcode.fish

PowerShell

Add to your PowerShell profile:

ggcode completion powershell | Out-String | Invoke-Expression

What Completion Includes

Category Examples
Subcommands config, completion, resume, mcp
Flags --help, --model, --resume, --vendor
Session IDs Previous session IDs for --resume
MCP server names Configured server names for tab completion

Verification

After installing, open a new shell and test:

ggcode <TAB>
ggcode config <TAB>
ggcode --resume <TAB>