Skip to content

Show usage for -h and --help in omarchy-crash-mute - #19496

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/e2a2bb2a-c2f2-48a3-81e4-56799b6c6642
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/e2a2bb2a-c2f2-48a3-81e4-56799b6c6642

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy-crash-mute --help in a terminal does not show help. In bin/omarchy-crash-mute it prints "Muted crash notifications for --help.", mutes a program called --help, and leaves it in the mute list.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy-crash-mute --help and press Enter.
  3. Type omarchy-crash-mute and press Enter.
  4. The first run prints "Muted crash notifications for --help." instead of usage, and the second lists --help as a muted program.

More cases

Direct -h treated as a program

Before After
before after

--help pollutes the mute list on the next run

Before After
before after

Related

When invoked directly, omarchy-crash-mute never checked $1 for a help flag, so --help/-h fell through to the program path and were muted via omarchy-toggle. Add the same -h/--help check used by other bin scripts, reusing the existing usage() helper and exiting 0 before the "--" separator is stripped, so --help/-h print usage with no state change while -- -h still mutes a program named -h. The prior ISO build failure was unrelated to this change (network timeout downloading linux-t2-headers and a missing omarchy-settings-dev package), so the change is left as-is.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

omarchy-crash-mute now shows usage and exits successfully for direct -h and --help calls.

  • The crash-mute command shows usage for either help flag.

Reviews (3) · Last reviewed commit: "Add regression test for -h and --help in..." · Reviewed by Greptile

Comment thread bin/omarchy-crash-mute Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the change, its callers, the existing crash-capture tests, and Greptile’s missing-coverage finding at 05baaeafacbb1bf9518593e82225195d475cd6a3. GPT-6 in Codex (reasoning effort not exposed) classified it as a bug fix, but the configured classification model, deepseek-v4p1-flash, returned no decision. Classification remains unsettled; no class labels were added, no tests ran, and no changes were pushed. A code-review second opinion was not requested because the workflow stops at classification.

PR #19291 also addresses direct option arguments to this command, using rejection rather than successful help handling. That overlap still needs comparison once classification is settled. This item is waiting for classification to be completed.

@omarchybot

Copy link
Copy Markdown
Collaborator

I read the updated head d120bb02e123aa2a396787916ca5421dcefc8be2, including the new regression checks for both help flags: successful exit, usage output, and no mute file. GitHub CI passes, and Greptile scores this head 5/5. I did not run tests on a worker because the workflow stops at classification.

GPT-6 in Codex (reasoning effort not exposed) classified this as a bug fix, but the configured classification model, deepseek-v4p1-flash, again returned no valid class. Classification remains unsettled; no labels or code changes were applied, and a code-review second opinion was not requested. This item is waiting for classification to be completed.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 20, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Fable 5.2 at d120bb02, with a second opinion from Opus 5.5 High and muse-wonder via pi, thinking high.

The bug is real. On a worker built from the Omarchy ISO, on quattro, omarchy-crash-mute --help and omarchy-crash-mute -h each print "Muted crash notifications for …", exit 0, and leave a mute flag by that name. On this head both print the usage line and write nothing, omarchy-crash-mute -- -h still mutes a program called -h, and omarchy crash mute --help through the router is unchanged. The command is run directly and not only through the router: the diagnose-crash skill tells an agent to call omarchy-crash-mute '<program>'.

test/shell.d/crash-capture-test.sh passes on this head (29 passed) and fails with the script restored to the base ("'-h' does not print usage"), so the new check tests the change. The rest of the suite on the worker: the CLI tests pass; in the shell tests ascii, branding-about-animation and runtime-smoke fail, and fail the same way on quattro; first-run failed only because of how the tree was copied to the worker and passed once that was put right. Five lines of fix and one loop of test is in proportion to the problem. Both reviewers found no defect in the change.

Two things noted and left as they are: the usage goes to stderr, so omarchy-crash-mute --help | less shows nothing (omarchy-notification-send sends its help to stdout); and omarchy-crash-mute --typo still mutes a program called --typo.

#19291 is an older open pull request for the same symptom and takes the other approach: it refuses any dash-leading name given without --, which also covers --typo, but answers --help with "Not a program name: --help" and exit 1, and changes the diagnose-crash skill to pass --. The two merge without a textual conflict, but not both as written: on the merged tree #19291's check fails ("an option is taken as a program name, so asking for help silently creates a mute") because --help now exits 0. Asked which should land, without my view, the panel split: Opus 5.5 High for #19291 as the older and broader one, muse-wonder for this one because a request for help should not be answered as an error. Choosing between them is the maintainer's call, so this is labelled verified and waits on the maintainer.

@omarchybot

Copy link
Copy Markdown
Collaborator

I compared d120bb02e123aa2a396787916ca5421dcefc8be2 with the updated #19291, including both diffs, the command, its callers, and regression checks. GPT-6 in Codex (reasoning effort not exposed), Opus 5.5 High, and muse-wonder via pi, thinking high reviewed the comparison. Both panel reviewers recommend keeping the older fix and folding this PR’s successful help handling into it; they agreed with the review, and independence is not guaranteed.

#19291 also rejects unescaped option arguments such as --typo. This PR contributes usage with exit 0 for -h and --help, plus checks that neither writes a mute file. I queued that improvement for #19291’s own session, with credit to @ThePrimeagen and preservation of -- -h. Its option-rejection tests will need to distinguish help from invalid options when the improvement is folded in.

No code was pushed and no new worker tests ran because the older competing fix is advancing. This head’s CI passes; its previous worker verification remains recorded. This PR stays open and waits on the maintainer while that handoff is worked.

omarchybot added a commit that referenced this pull request Nov 26, 2026
Fold #19496's successful help handling into the broader option guard. Check help before consuming -- so escaped program names remain literal, and distinguish help from invalid options in the regression checks.

Co-Authored-By: ThePrimeagen <the.primeagen@gmail.com>
Co-Authored-By: GPT-6 in Codex (reasoning effort not exposed) <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants