Skip to content

Show nested subcommand help and a runnable suggestion for unknown commands - #19456

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/f7ce967b-9d4b-4b10-b621-f1aafcc9b277
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/f7ce967b-9d4b-4b10-b621-f1aafcc9b277

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy hyprland window --help in bin/omarchy prints Unknown Omarchy command with no window help, and its Did you mean: omarchy hyprland ? suggestion loops to itself when run.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy hyprland window and press Enter. It lists the hyprland window commands.
  3. Type omarchy hyprland window --help and press Enter.
  4. You see Unknown Omarchy command: omarchy hyprland window --help and Did you mean: omarchy hyprland ?, with no window commands listed.

More cases

Running the printed suggestion verbatim loops to itself

Before After
before after

Other nested prefix --help

Before After
before after

Unknown multi-word command under a valid group

Before After
before after

Related

Strip trailing --help/-h before calling show_prefix_help in
dispatch_or_help, so 'omarchy hyprland window --help' (and workspace
layout/monitor equivalents) matches COMMAND_USAGE as
'omarchy hyprland window' and lists its subcommands instead of
falling through to Unknown. Make suggest_command return the full
candidate route instead of only its first word, and print the
suggestion without a separate ' ?' argument ('omarchy <route>?'),
so the suggested command is a runnable full route and does not
re-enter the Unknown/suggest loop as 'omarchy hyprland ?'.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

This PR fixes help for nested command groups and makes unknown-command suggestions runnable.

  • Nested help requests now show matching command lists.
  • Unknown-command suggestions now open help when run.

Both previous findings are addressed. Bash syntax checks and focused help checks passed; the full CLI suite was not run.

Reviews (2) · Last reviewed commit: "Print runnable --help suggestion for unk..." · Reviewed by Greptile

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

Copy link
Copy Markdown
Collaborator

I read the diff, surrounding router code, existing comments, and the base branch’s command guidance. GPT-6 in Codex (effort not exposed by this session) assessed this as a bug fix, but the configured DeepSeek V4.1 Flash classifier returned no classification, so classification remains unsettled. The reviewer health check answered successfully.

Worker tests and fixes have not run because the queue workflow stops at an unsettled classification. No labels or commits were added; this is waiting for classification to be resolved.

@omarchybot

Copy link
Copy Markdown
Collaborator

I read the updated router and regression tests at 2b9c255cba029effff4eb390161912a2eefcf50c, including the changes to the copied suggestion and the existing review replies. GPT-6 in Codex (effort not exposed by this session) assessed this as a bug fix. The configured DeepSeek V4.1 Flash classifier again returned no valid classification for this head, so classification remains unsettled; the separate reviewer health check passed.

Worker reproduction and the CLI suite have not run because the queue workflow stops at an unsettled classification. No labels or commits were added. This is waiting for classification to be resolved before verification can proceed.

@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.

The prefix fix here is close to #19488's: it strips trailing --help and -h and nothing else. The difference is that this one also carries a second change. 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. Most of the 38 added test lines cover that 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