Repository navigation
Show prefix help when --help follows a command prefix - #19488
ThePrimeagen wants to merge 2 commits into
Conversation
In dispatch_or_help, `omarchy theme bg --help` passed the full `omarchy theme bg --help` string to show_prefix_help, which never matches a command usage prefix, so it fell through to Unknown command. Strip a trailing --help/-h from the args used for the prefix lookup so a prefix such as `theme bg` lists its subcommands with or without the help flag, while the Unknown error still reports the original args.
[Low impact] The PR appears safe to merge. SummaryThe PR makes trailing
No new issues found in the changes since the previous review. Reviews (2) · Last reviewed commit: "Add CLI regression tests for prefix --he..." · Reviewed by Greptile |
|
GPT-6 High in Codex read the router change, surrounding help dispatch, existing CLI tests, and Greptile’s review. I classified this as a bug fix, but the configured second classifier, deepseek-v4p1-flash, returned no usable classification, so the two-model classification is incomplete. The separate review service health check passed. No worker tests ran and no code or labels changed. This is waiting on classification before verification can continue. |
|
GPT-6 High in Codex read the new regression tests in 313b4cf, covering prefix help with both No worker tests ran, and no code or labels changed. This is waiting on a completed classification before verification can continue. |
|
Reviewed by Claude Fable 5.2, with a second opinion from Opus 5.5 High and muse-wonder via pi, thinking high. The bug is real and this fixes it: on Run on an Omarchy ISO worker: The change strips one trailing Nine other open pull requests address the same symptom (#19448, #19450, #19456, #19460, #19473, #19487, #19489, #19491, #19495). This is the one carried forward because it is the only one that changes prefix help and nothing else: the others also change the "Did you mean" line, which was declined in #18811, or accept |
Running
omarchy theme bg --helpshould list thebgsubcommands, butbin/omarchyprintsUnknown Omarchy command: omarchy theme bg --helpand exits 127.Screenshots
Reproduce
omarchy theme bg --helpand press Enter.Unknown Omarchy command: omarchy theme bg --help,Did you mean: omarchy theme ?, andexit:127, instead of thetheme bg commands:list.More cases
omarchy theme bg -hRelated
bin/omarchyhelp handling for unknown commands