Skip to content

fix: generate zsh completion for compinit#21834

Closed
dbydd wants to merge 1 commit into
NousResearch:mainfrom
dbydd:fix/zsh-completion-zfunc-compinit
Closed

fix: generate zsh completion for compinit#21834
dbydd wants to merge 1 commit into
NousResearch:mainfrom
dbydd:fix/zsh-completion-zfunc-compinit

Conversation

@dbydd

@dbydd dbydd commented May 8, 2026

Copy link
Copy Markdown

Summary

  • make generated zsh completion valid for compinit / ~/.zfunc/_hermes installs
  • replace invalid grouped _arguments specs like { -h,--help } with separate zsh option specs
  • remove direct _hermes "$@" self-invocation from the generated completion file
  • update zsh completion comments to document the autoload/fpath install path
  • add regression coverage for the invalid zsh output

Validation

  • git diff --check
  • python3 -m compileall hermes_cli/completion.py tests/hermes_cli/test_completion.py
  • scoped assertions: generated code no longer contains _hermes "$@" or {{-h,--help}} / {{-V,--version}} / {{-p,--profile}}
  • manual local validation on macOS zsh 5.9 using ~/.zfunc/_hermes + compinit: hermes <TAB> no longer raises _arguments:comparguments:327

Notes

I intentionally kept the fix narrow: only zsh completion generation and regression tests changed. No provider config, dependency lockfile, shell rc file, or runtime code path was modified.

Closes #21829
Related to #17266

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels May 8, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Superseded by PR #25075 (#25075) which applies @ZeterMordio's compdef _hermes hermes fix in #11754 (the minimal change preserving the eval "$(hermes completion zsh)" install flow that's documented in our quickstart). Thanks for flagging the issue.

@teknium1 teknium1 closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zsh completion breaks for compinit/~/.zfunc installs

3 participants