Skip to content

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

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

ThePrimeagen wants to merge 2 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

[Low impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Nested command help now lists matching commands while keeping help for command aliases intact.

  • Nested help requests now show matching commands or group help.

Both previous findings are fixed. Bash syntax checks and all four focused help checks passed.

Reviews (2) · Last reviewed commit: "Resolve alias routes before prefix help ..." · 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.

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