Repository navigation
Show help for nested command prefixes like theme bg - #19491
ThePrimeagen wants to merge 2 commits into
Conversation
Strip `?` and flag-like arguments (in addition to --help/-h) when building the prefix for show_prefix_help in dispatch_or_help, so `omarchy theme ?` and `omarchy theme --all` resolve to the `theme` prefix and show its commands with exit 0 instead of falling through to Unknown with a tautological suggestion. Nested prefixes like `theme bg --help` and `install ai --help` continue to show their prefix help.
[Low impact] The PR appears safe to merge. SummaryThe PR makes help work for nested command prefixes and gives users runnable command suggestions.
Both previous findings are fixed. Focused checks confirmed the reported help cases and unknown-command exit codes; Bash syntax checks passed. Reviews (2) · Last reviewed commit: "Suggest runnable --help command and add ..." · Reviewed by Greptile |
|
GPT-6 in Codex (effort setting not exposed) read the router diff, surrounding dispatch code, existing CLI tests, and the base branch’s command rules. I classified this as a bug fix, but the second classifier, deepseek-v4p1-flash, returned no usable class, so the classification is unsettled. No worker tests ran, and no code or labels changed. This is waiting for the classification to be settled before verification continues. |
|
GPT-6 in Codex (effort setting not exposed) reviewed the updated router, regression tests, and Greptile threads at |
|
The prefix help bug here is real: on What this one does beyond that fix: it removes every argument starting with 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. |
Typing
omarchy theme bg --helpin a terminal is refused bybin/omarchyas an unknown command suggestingomarchy theme ?, and running that suggestion loops back to itself, so the background help is never shown.Screenshots
Reproduce
omarchy theme bg --helpand press Return.omarchy theme ?and press Return.Unknown Omarchy command: omarchy theme bg --help,Did you mean: omarchy theme ?, and exit 127, then the same refusal foromarchy theme ?itself, with notheme bghelp.More cases
Running the suggestion loops
Other virtual prefixes with --help
Unknown flag on a valid group
Related
theme ?to a runnable--helpcommand without showing nested prefix help liketheme bg --help.