Skip to content

Show prefix help for shared commands with --help and suggest runnable commands - #19495

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/490c5585-93e3-47ef-8963-de92aec87969
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/490c5585-93e3-47ef-8963-de92aec87969

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

In bin/omarchy, running omarchy hyprland workspace layout --help prints Unknown Omarchy command: omarchy hyprland workspace layout --help and suggests omarchy hyprland ? instead of listing the layout commands. Running that suggestion fails the same way, so the printed suggestion can never succeed.

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. You see Unknown Omarchy command: omarchy hyprland workspace layout --help with Did you mean: omarchy hyprland ? instead of the layout help listing current, default and toggle.

More cases

Re-running the printed suggestion

Before After
before after

Another shared prefix with --help

Before After
before after

Unknown command under a known group

Before After
before after

Related

Strip --help/-h (before --) from the args before calling show_prefix_help in dispatch_or_help, so a shared prefix such as "hyprland workspace layout --help" matches usages under that prefix and shows prefix help instead of Unknown. Also drop the literal trailing " ?" from the "Did you mean" suggestion, which no code treats as a help token, so the suggestion is a real runnable group command (e.g. "omarchy hyprland") instead of looping on the unknown "omarchy hyprland ?".
@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.

Summary

The PR fixes help for shared command prefixes and removes the trailing ? from command suggestions.

  • Shared command prefixes now show help when you add --help.
  • Unknown-command suggestions now run as shown.

The previous coverage finding is addressed. Focused command checks and Bash syntax checks passed; the full suite was not run. No new issues found.

Reviews (2) · Last reviewed commit: "Add CLI regression tests for shared pref..." · Reviewed by Greptile

Comment thread bin/omarchy Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Read the diff, surrounding CLI routing and tests, comments, and the base branch’s command guide. Codex High classified this as a bug, but the configured classification model, deepseek-v4p1-flash, returned no usable classification, so classification remains unsettled. No labels or code changes were made, and no worker tests or second-opinion code review ran. This is waiting for classification to be resolved before verification can continue.

@omarchybot

Copy link
Copy Markdown
Collaborator

Read the regression tests added at 72d38644fe197bdc4c842cd5e1f8cbe7485ca7ae, the CLI routing change, surrounding code, and the base branch’s command guide. GPT-6 in Codex (reasoning effort not reported) classified this as a bug; the configured classification model, deepseek-v4p1-flash, again returned no usable class. Classification remains unsettled for this revision, so worker verification and second-opinion code review have not run, and no labels or code changes were made. The reviewer connectivity check succeeded; the blocker is classification. 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: 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. It also stops building the prefix at --, so omarchy theme bg -- anything lists the commands and exits 0 where quattro exits 127.

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