Skip to content

Show prefix help for multi-word commands given --help or ? - #19487

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/808710e1-2c7d-4a7f-bdb4-847b9f483c80
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/808710e1-2c7d-4a7f-bdb4-847b9f483c80

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy audio ? in bin/omarchy prints "Unknown Omarchy command: omarchy audio ?" and suggests running that same unrunnable form again, while omarchy audio input --help and other multi-word prefixes are likewise rejected instead of listing their commands.

Screenshots

Before After
before after

Reproduce

  1. Open a terminal with Super+Enter.
  2. Type omarchy audio ? and press Enter.
  3. You see "Unknown Omarchy command: omarchy audio ?" and "Did you mean: omarchy audio ?" with no audio command listing.

More cases

omarchy audio input --help

Before After
before after

omarchy audio output --help

Before After
before after

omarchy hw asus --help

Before After
before after

Related

…help lookup

'?' was not recognised as help, so 'omarchy audio ?' fell through to
Unknown and the suggestion printed the same unrunnable form. Recognising
'?' in remaining_has_help_flag and in the group-help shortcuts (both
dispatch paths and main) makes it show the listing.

dispatch_or_help also passed the full argv including --help to
show_prefix_help, so multi-word prefixes such as 'omarchy audio input
--help', 'omarchy audio output --help' and 'omarchy hw asus --help'
never matched a usage prefix. Strip trailing --help/-h/'?' tokens
before that lookup so the prefix help lists the input/output/asus
commands, matching the bare-prefix form. Guard the direct-route
prefix special case against treating '?' as a prefix word.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The follow-up changes appear safe to merge.

Summary

The CLI now shows matching commands when a multi-word prefix ends in --help, -h, or ?.

  • Help markers now show matching commands for multi-word prefixes.

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

Comment thread bin/omarchy Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High read the diff, PR discussion, and repository guidance at d11f0f76157829e047873964825b77a72f9a70c5 and classified the prefix-help routing change as a bug fix. The configured second classifier, deepseek-v4p1-flash, returned no usable classification, so the required classification agreement is still missing. No worker tests ran and no labels were added. This is waiting for the classification to be settled before verification can proceed.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 High in Codex read the updated diff and discussion at c282c51a7b0c87ce03a459cef73bd3e7e42c5074, including the new prefix-help regression cases in test/cli, against the base branch's repository guidance. My classification remains bug, but the configured second classifier, deepseek-v4p1-flash, again returned no usable classification for this head. Classification agreement is required before verification can proceed, so no worker tests ran and no labels were added. This is waiting for that classification to be settled; the added tests have been read, not run.

@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 makes a literal ? a help flag everywhere, including in remaining_has_help_flag, which scans every argument left after a resolved command. With that, omarchy notification send "Question" "?" prints help and sends nothing, where on quattro both words reach the command; that was the reason the ? handling was taken out of #18811 before the maintainer closed it. It also needs an extra ? guard in the fast path to compensate.

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