Repository navigation
Suggest a runnable --help command for unknown commands and accept ? as help - #18811
ThePrimeagen wants to merge 3 commits into
Conversation
bin/omarchy printed `Did you mean: omarchy <group> ?`, but no dispatch path recognised `?`, so running the suggestion reported the same command as unknown and suggested itself again. Treat `?` like `--help`/`-h` in remaining_has_help_flag(), in the group-help branches of dispatch_fast_or_help() and dispatch_or_help(), and in the top-level and `commands` help cases, so `omarchy notification ?` and `omarchy theme ?` list their group commands. Also change the unknown-command suggestion to `omarchy <group> --help`, the documented runnable form, so suggestions for unknown subcommands and truncated words list the group commands.
[Low impact] The PR appears safe to merge. SummaryChanges the unknown-command suggestion to
Reviews (4) · Last reviewed commit: "Keep ? as plain input, change only the s..." · Reviewed by Greptile |
Add one check to test/cli that `omarchy notification ?` prints the Notification commands listing. On the base branch it reports the command as unknown and exits 127. Co-authored-by: Cursor <cursoragent@cursor.com>
remaining_has_help_flag scans every leftover argument, so treating ? as a help flag made `omarchy notification send "Question" "?"` print help and send nothing, and an unquoted ? is a glob that expands to any one-character filename. The runnable --help suggestion is the fix; it needs no test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed a476608, which narrows this PR to the one-line message fix. An unknown command now suggests The four changes that made a bare Checked on an Omarchy ISO worker. The PR's previous head printed notification-send's usage for Codex Medium reviewed the commit and found nothing wrong. It confirmed the tree now matches |
|
It's a question. I don't think this makes sense. |
Mistype an
omarchycommand andbin/omarchysuggestsomarchy <group> ?. Running that suggestion fails the same way and suggests itself again, because nothing inbin/omarchytreats?as a help flag.Screenshots
Reproduce
omarchy theme bogus --helpand press Enter. It printsDid you mean: omarchy theme ?.omarchy theme ?, and press Enter. It printsUnknown Omarchy command: omarchy theme ?and suggestsomarchy theme ?again, instead of listing the theme commands.Related
bin/omarchy's unknown-command message, pointing a mistyped subcommand atomarchy <group> --help