Skip to content

fix(completion): correct zsh _arguments syntax for options with short and long forms#22701

Closed
Ninso112 wants to merge 1 commit into
NousResearch:mainfrom
Ninso112:fix-zsh-completion
Closed

fix(completion): correct zsh _arguments syntax for options with short and long forms#22701
Ninso112 wants to merge 1 commit into
NousResearch:mainfrom
Ninso112:fix-zsh-completion

Conversation

@Ninso112

@Ninso112 Ninso112 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix invalid _arguments syntax in generated zsh completion script
  • The pattern (-h --help){-h,--help}[...] is rejected by zsh because () groups cannot contain long options with spaces
  • Changed to (-)'{-h,--help}'[...] which is the standard zsh completion convention
  • Added regression test to prevent future breakage

Closes #22686

… and long forms

The generated zsh completion script used invalid _arguments syntax:
'(-h --help){-h,--help}[...]'.  Zsh () groups must contain only single-letter
short options, not long options with spaces.  Changed to '(-)'{-h,--help}'[...]'
which is the standard zsh completion convention.

Closes NousResearch#22686
@teknium1

teknium1 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of #22802 (salvage of #22727). Your fix was correct but the test file had a duplicated test method (same name twice, second silently shadowed the first). Credited in the salvage PR body. Thanks!

@teknium1 teknium1 closed this May 9, 2026
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels May 9, 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.

BUG: zsh completion script has invalid _arguments syntax

3 participants