Skip to content

Fix prefix --help and make unknown-command suggestions runnable - #19448

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/d4c0229b-9cfa-4611-87fd-2fc0d296e7c4
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/d4c0229b-9cfa-4611-87fd-2fc0d296e7c4

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy setup security --help in bin/omarchy is refused as unknown and suggests omarchy setup ?, which fails the same way when run verbatim.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Return to open a terminal.
  2. Type omarchy setup security --help and press Enter.
  3. See Unknown Omarchy command: omarchy setup security --help, Did you mean: omarchy setup ?, and exit 127 instead of the setup-security commands.

More cases

Running the printed suggestion verbatim loops

Before After
before after

Unknown under a valid group suggests only the group, un-runnably

Before After
before after

Strip --help/-h/? before the prefix-help lookup in dispatch_or_help,
so 'omarchy setup security --help' lists the setup-security children
instead of matching no route. Treat '?' as a help token for group
help in both dispatch paths, so the formerly printed suggestion
'omarchy setup ?' now lists setup commands. Print the unknown-command
suggestion as 'omarchy <suggestion> --help' so it is runnable verbatim
instead of ending in a spurious '?' argument that self-suggested.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous coverage gap is addressed and no new blocking issues were found.

Summary

The PR fixes help for command prefixes and makes unknown-command suggestions runnable. The follow-up adds regression tests covering both paths.

  • Help words now open matching command and group lists.
  • Unknown-command suggestions now open help when run.

The previous request for regression coverage is fully addressed. No new issues found.

Reviews (2) · Last reviewed commit: "Add CLI regression tests for prefix --he..." · Reviewed by Greptile

Comment thread bin/omarchy Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the router change, surrounding dispatch code, existing CLI coverage, and Greptile’s regression-test finding. My review (GPT-6 in Codex; reasoning effort not exposed) classifies this as a bug, but the second classifier, deepseek-v4p1-flash, supplied no usable classification, so classification remains unsettled. No tests or full second-opinion review ran, and no code or labels changed. This is waiting for the classification to be settled before verification.

@omarchybot

Copy link
Copy Markdown
Collaborator

I read the regression tests added in 8feb94730df6883ea9f1e65e149a3fd28cdecf7d, including prefix --help/-h and following printed suggestions without executing the target command. My review was GPT-6 in Codex (reasoning effort not exposed). I classify this revision as a bug fix, but the second classifier, deepseek-v4p1-flash, again supplied no usable classification. Classification remains unsettled, so I have not run the tests or a full second-opinion review, and no code or labels changed. Verification is waiting for classification to be settled.

@omarchybot

Copy link
Copy Markdown
Collaborator

The prefix help bug here is real: on quattro, omarchy theme bg lists its commands while omarchy theme bg --help exits 127, reproduced on an Omarchy ISO worker. Ten open pull requests fix it, and #19488 is the one being carried forward, because it changes prefix help and nothing else. It is verified on a worker and waiting on the maintainer.

What this one does beyond that fix: It changes the "Did you mean" line to end in --help, which is the one-line change #18811 was narrowed to before the maintainer closed it. It accepts a literal ? as a help flag after a group, which #18811 also proposed; unquoted, ? is a shell glob that expands to any one-character filename in the current directory. And it removes --help, -h and ? from anywhere in the arguments, including after --, rather than only a trailing one. Most of the 38 added test lines cover the suggestion change rather than prefix help.

This pull request was read, not run. Reviewed by Claude Fable 5.2; the comparison of all ten diffs also went to Opus 5.5 High and muse-wonder via pi, thinking high, who reached the same choice and named the same points about this one. They could read my notes, so that agreement is not guaranteed to be independent. Nothing was pushed here. It is waiting on the maintainer, who decides whether to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants