Skip to content

feat: add Zsh shell completion support#79

Open
jelloeater-agent wants to merge 1 commit into
aannoo:mainfrom
jelloeater-agent:main
Open

feat: add Zsh shell completion support#79
jelloeater-agent wants to merge 1 commit into
aannoo:mainfrom
jelloeater-agent:main

Conversation

@jelloeater-agent

Copy link
Copy Markdown

Add Zsh shell completion for all hcom commands via a new hcom completion zsh command.

Changes

New: hcom completion zsh command

  • Generates a complete _hcom Zsh completion function covering:
    • All 18 CLI commands (send, list, events, stop, start, listen, status, config, hooks, archive, reset, transcript, bundle, kill, term, relay, run, update, completion)
    • All 11 released tools + aliases (claude, gemini, codex, opencode, kilo/kilocode, pi/pi-agent, omp/omp-agent, antigravity/agy, cursor/cursor-agent, kimi, copilot)
    • All hook command names (70+)
    • Resume/fork commands (r/resume, f/fork)
    • Global flags (--name, --go, --help, -h, --version, -v, --new-terminal)
    • Numeric count prefix (hcom 3 claude ...)
    • Per-tool args flags (e.g. --claude-args, --gemini-args)
    • All per-command flags with descriptions

--install flag

  • Writes the completion script to a writable directory in $fpath or standard locations (~/.zsh/completion, /usr/local/share/zsh/site-functions/, ~/.oh-my-zsh/completions/)

Generation from integration specs

  • The completion script is built programmatically from integration_spec::ALL, ensuring it stays in sync as tools are added or removed
  • All 1993 tests pass

Usage

# Source directly
eval "$(hcom completion zsh)"

# Install permanently
hcom completion zsh --install

* New 'hcom completion zsh' command generates a _hcom Zsh completion
  function covering all commands, tools, hooks, and flags
* Supports '--install' flag to write completions to a detected
  directory
* Completion script is generated programmatically from integration_spec,
  staying in sync as tools are added or removed
* All 1993 existing tests pass

Usage:
  eval "$(hcom completion zsh)"
  hcom completion zsh --install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant