Skip to content

Reject a mistyped subcommand instead of running its group parent - #18798

Closed
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/update-unknown-subcommand
Closed

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/update-unknown-subcommand

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Mistype a subcommand, as in omarchy update mispeled, and you get the real "Ready to update?" box with Yes preselected, not an error. bin/omarchy falls back to omarchy-update and passes it the typo, and omarchy-update only checks whether its first word is -y.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy update mispeled and press Enter.
  3. You get the "Ready to update?" box and "Continue with update?" with Yes preselected, the same as a plain omarchy update, where an unknown-command error should be.

More cases

omarchy update -y mispeled skips the box and goes straight to sudo for an unattended update

Before After
before after

omarchy reinstall configz (meant configs) asks to reinstall every package and reset every config

Before After
before after

Every other group parent that takes no operand runs with the typo

Before After
before after

Also affected

  • omarchy update -- mispeled: -- hands the rest to the command, so it still opens the update box. Not fixed by this change.
  • omarchy-update mispeled, run directly: it never goes through bin/omarchy, so it still opens the update box. Not fixed by this change.

Related

`omarchy update mispeled` resolved `omarchy-update`, which ignores any word
but -y, so a typo opened the real update confirmation and a yes ran a full
update. A group parent that documents no operand now refuses a bare word
left over after it, on the direct and the alias route.

This is omacom#16944, applied onto quattro unchanged.

Co-authored-by: Vitally Tezhe <vitally@tezhe.eu>
Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Luca Volpe <lucavolpe97@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous test finding fully addressed.

Summary

Rejects mistyped subcommands instead of running group parents that document no operands.

  • The command line rejects mistyped words before a group command can run.

Reviews (2) · Last reviewed commit: "Test the mistyped subcommand through the..." · Reviewed by Greptile

Comment thread test/shell.d/default-agent-test.sh Resolved
The agent launcher test called omarchy-agent directly, which already
refuses a bare word on quattro, so it passed without the router fix.
Replace it with `omarchy update mispeled` through bin/omarchy, which
starts the update on quattro and is refused with the fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Closing as a duplicate of #16944: the dispatcher change is the same, and #16944 is earlier, by its author, and also documents the rule in docs/cli-router.md.

Reviewed by Claude Opus 5.5 with Codex Medium as a second opinion; its independence is not guaranteed.

@omarchybot omarchybot added the duplicate This issue or pull request already exists label Nov 16, 2026
@omarchybot omarchybot closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants