Skip to content

feat(cli): drop redundant 'wormhole send/receive' lines from --help#355

Open
mvanhorn wants to merge 1 commit intomagic-wormhole:mainfrom
mvanhorn:osc/209-adapt-help-message
Open

feat(cli): drop redundant 'wormhole send/receive' lines from --help#355
mvanhorn wants to merge 1 commit intomagic-wormhole:mainfrom
mvanhorn:osc/209-adapt-help-message

Conversation

@mvanhorn
Copy link
Copy Markdown

The default binary name is wormhole-rs, but the --help after-help text references wormhole send and wormhole receive:

Run a subcommand with `--help` to know how it's used.
To send files, use `wormhole send <PATH>`.
To receive files, use `wormhole receive <CODE>`.

So the example commands don't match what users actually type. Per @felinira's comment on #209, the cleanest fix is to drop the last two lines - the per-subcommand wormhole-rs send --help / receive --help already documents what those subcommands need.

Changes:

  • cli/src/main.rs:253-255: keep only Run a subcommand with --help to know how it's used. in after_help.
  • cli/tests/cmd/help.stdout and cli/tests/cmd/basic.stderr: drop the two corresponding lines from the trycmd snapshots.

Verified locally:

$ cargo test --test cli_tests
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

All 9 trycmd cases pass.

Closes #209.

This contribution was developed with AI assistance (Claude Code).

The default binary name is 'wormhole-rs', not 'wormhole', so the two
example lines in the after-help output are technically wrong. They are
also redundant - the per-subcommand --help already documents send and
receive. Drop them as suggested by @felinira in magic-wormhole#209.

Updates the trycmd snapshots in cli/tests/cmd/help.stdout and
basic.stderr to match.

Closes magic-wormhole#209
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.39%. Comparing base (8b571ba) to head (7b7aebf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #355      +/-   ##
==========================================
+ Coverage   39.36%   39.39%   +0.03%     
==========================================
  Files          20       20              
  Lines        3292     3292              
==========================================
+ Hits         1296     1297       +1     
+ Misses       1996     1995       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt help message for renamed binary

1 participant