Skip to content

Show prefix help for shared commands when --help is given - #19460

Closed
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/dfd187e5-0670-4e63-b4dc-1523b7e40016
Closed

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/dfd187e5-0670-4e63-b4dc-1523b7e40016

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy hyprland workspace layout --help in bin/omarchy prints Unknown Omarchy command instead of the workspace layout subcommands, and its Did you mean: omarchy hyprland ? suggestion cannot be run.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy hyprland workspace layout --help and press Enter.
  3. It prints Unknown Omarchy command: omarchy hyprland workspace layout --help and Did you mean: omarchy hyprland ?, with no workspace layout help.

More cases

Running the printed suggestion loops on itself

Before After
before after

Same failure for every other shared prefix with --help

Before After
before after

Unknown subcommand suggests the same un-runnable ? form

Before After
before after

Related

Strip --help/-h (and ?) when trying show_prefix_help in dispatch_or_help, so shared prefixes like hyprland workspace layout/monitor with --help list their subcommands. Accept ? as a help request in both group-help shortcuts, so omarchy hyprland ? shows group help instead of looping. Print the Did you mean suggestion without the trailing " ?" punctuation so it is a runnable command.
@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 outstanding issues were found.

Summary

The PR makes shared command prefixes show help when a help flag is given and makes unknown-command suggestions open help safely.

  • The CLI shows shared-prefix help when you add a help flag.
  • Unknown-command suggestions now open help when you run them.

The previous missing-test finding is addressed. Bash syntax checks and focused help checks passed. No new issues found.

Reviews (2) · Last reviewed commit: "Suggest --help for unknown commands and ..." · Reviewed by Greptile

Comment thread bin/omarchy Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Read the routing change, existing CLI coverage, and the related help-routing changes in #18811 and #6788. GPT-6 in Codex (reasoning effort not exposed) classified this as a bug fix, but the second classifier, deepseek-v4p1-flash, returned no classification. Classification remains unsettled, so no class or verification labels were applied and no worker tests ran. This is waiting on the maintainer to resolve the incomplete classification; no code-review second opinion has run.

@omarchybot

Copy link
Copy Markdown
Collaborator

Read the updated routing and regression tests at 2fa95254b8d64f4ae30050680f738f9c2dc0ead4, the surrounding dispatcher, and the base branch’s command metadata guide. GPT-6 in Codex (reasoning effort not exposed) classified this as a bug fix; the second classifier, deepseek-v4p1-flash, returned no classification again. Classification remains unsettled, so no worker tests or code-review second opinion ran, and no verification labels were applied. This is waiting on the maintainer to resolve the incomplete classification.

@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. It removes a help flag from any position before --, so omarchy hyprland workspace --help layout becomes a layout listing. 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. Classification is unsettled: the two classifying models disagreed on whether this is a bug fix or an enhancement, so it carries no class label.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants