Skip to content

Show help for nested command prefixes such as theme bg - #19489

Closed
ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/1dfd0703-0079-4f7d-a09f-fe3861e1b783
Closed

ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/1dfd0703-0079-4f7d-a09f-fe3861e1b783

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy theme bg --help in bin/omarchy prints “Unknown Omarchy command: omarchy theme bg --help” and suggests omarchy theme ?, which fails itself, instead of listing the theme bg commands.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy theme bg --help and press Enter.
  3. It prints “Unknown Omarchy command: omarchy theme bg --help” and “Did you mean: omarchy theme ?”, with no theme bg commands listed.

More cases

omarchy theme bg -h

Before After
before after

Running the printed suggestion omarchy theme ?

Before After
before after

omarchy theme bogus

Before After
before after

Related

Handle --help/-h on multi-word prefixes such as `omarchy theme bg` in
both dispatch_fast_or_help and dispatch_or_help by stripping the
trailing flag and showing prefix help for the preceding words.
Fall back to the longest known prefix and then the group help, so
unknown words under a known group (e.g. `theme bogus`, `theme ?`)
list the group commands instead of an Unknown/Did-you-mean loop.
Print the suggestion without a trailing ` ?` so it is runnable.
@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; no actionable new issue was found.

Summary

Adds help for nested command prefixes such as omarchy theme bg.

  • Nested command prefixes now show their matching routes with help flags.
  • Unknown-command suggestions no longer end with a question mark.

Reviews (3) · Last reviewed commit: "Merge origin/quattro and resolve conflic..." · Reviewed by Greptile

Comment thread bin/omarchy Resolved
Comment thread bin/omarchy Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the router diff, surrounding dispatch code, and existing CLI tests. My assessment is a bug fix, but the classification reviewer, deepseek-v4p1-flash, returned no usable classification. Classification remains unsettled, so worker tests and fixes were not attempted. This needs classification resolved before verification can continue.

Reviewed by GPT-6 in Codex (effort not exposed); no second code review ran.

@omarchybot

Copy link
Copy Markdown
Collaborator

I read revision 9928fafa14990fa085ca6f29c9f77a27eaec6a93, including the alias-routing change, added CLI regressions, and review replies. GPT-6 in Codex (effort not exposed) assessed this as a bug fix, but the classification reviewer, deepseek-v4p1-flash, returned no usable classification for this revision. Classification remains unsettled, so worker tests and a second code review did not run, and no fixes or labels were applied. This is waiting for classification to be resolved before verification can continue.

@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: after the trailing-flag case it tries every shorter prefix and then the group, so omarchy theme bogus prints the theme listing and exits 0 where quattro exits 127; a mistyped subcommand stops being an error, which is the opposite of what #16944 does for resolved parents. It drops the ? from the "Did you mean" line without adding anything, so omarchy migrat prints Did you mean: omarchy migrate, and running that as printed runs pending migrations. The plugin install --help and plugin rm --help tests pass on quattro already.

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-read eb07b20d4fb3f9920121ac54ee9e7f6aa346782f after the merge from quattro and compared the ten prefix-help fixes. The merge retains the broader fallback: from the source, omarchy theme bg bogus and omarchy theme bg -- payload reach a shorter prefix and return success instead of an unknown-command error. #19488 handles nested help without that behavior and remains the competing fix being carried forward. Nothing here needs folding into it.

No worker tests ran and nothing was pushed for this revision because it lost that comparison. GitHub also reports a failing test (exclusive) check. GPT-6 in Codex (effort not exposed) reviewed the revision; Opus 5.5 High and muse-wonder via pi, thinking high reviewed the competing diffs through omabot review and reached the same choice. Their agreement is not guaranteed to be independent. This remains open, waiting on the maintainer's decision.

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