Repository navigation
Fix prefix --help and make unknown-command suggestions runnable - #19448
ThePrimeagen wants to merge 2 commits into
Conversation
Strip --help/-h/? before the prefix-help lookup in dispatch_or_help, so 'omarchy setup security --help' lists the setup-security children instead of matching no route. Treat '?' as a help token for group help in both dispatch paths, so the formerly printed suggestion 'omarchy setup ?' now lists setup commands. Print the unknown-command suggestion as 'omarchy <suggestion> --help' so it is runnable verbatim instead of ending in a spurious '?' argument that self-suggested.
[Medium impact] The PR appears safe to merge; the previous coverage gap is addressed and no new blocking issues were found. SummaryThe PR fixes help for command prefixes and makes unknown-command suggestions runnable. The follow-up adds regression tests covering both paths.
The previous request for regression coverage is fully addressed. No new issues found. Reviews (2) · Last reviewed commit: "Add CLI regression tests for prefix --he..." · Reviewed by Greptile |
|
I read the router change, surrounding dispatch code, existing CLI coverage, and Greptile’s regression-test finding. My review (GPT-6 in Codex; reasoning effort not exposed) classifies this as a bug, but the second classifier, deepseek-v4p1-flash, supplied no usable classification, so classification remains unsettled. No tests or full second-opinion review ran, and no code or labels changed. This is waiting for the classification to be settled before verification. |
|
I read the regression tests added in |
|
The prefix help bug here is real: on What this one does beyond that fix: It changes the "Did you mean" line to end in 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. |
Running
omarchy setup security --helpinbin/omarchyis refused as unknown and suggestsomarchy setup ?, which fails the same way when run verbatim.Screenshots
Reproduce
omarchy setup security --helpand press Enter.Unknown Omarchy command: omarchy setup security --help,Did you mean: omarchy setup ?, and exit 127 instead of the setup-security commands.More cases
Running the printed suggestion verbatim loops
Unknown under a valid group suggests only the group, un-runnably