Skip to content

Regroup --help flags by role; show -h/-v shorthands - #84

Merged
polius merged 1 commit into
mainfrom
feat/help-flag-grouping
Jun 25, 2026
Merged

polius merged 1 commit into
mainfrom
feat/help-flag-grouping

Conversation

@polius

@polius polius commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

The fsend --help flag list was one long COMMON FLAGS block (12 entries) that mixed send-only and receive-only flags together — so a sender had to scan past --out/--yes/--overwrite/--dry-run/--checksum to find --text/--pass, and vice versa. fsend's whole model is "am I sending or receiving?", so the help now groups by that:

SENDING      --text  --pass  --exclude  --name
RECEIVING    --yes  --out  --overwrite  --dry-run  --checksum
GENERAL      --quiet  --debug  --help,-h  --version,-v
ADVANCED     --connect  --send/--receive  --update  --uninstall
  • Maps to intent — jump straight to your mode; the send/receive mixing is gone.
  • The occasional flags (--dry-run, --checksum) now sit in RECEIVING where they belong, instead of padding a "common" shortlist.
  • Matches usage.md (Sending / Receiving / Shared), so help and docs reinforce each other.
  • -h / -v shorthands listed — they already worked but weren't shown.

Notes

  • Only the root helpTemplate changed; completion and server have their own templates (untouched).
  • Header bolding is generic (any ALL-CAPS line), so the new section names needed no logic change — just the template string and the test's header list.
  • No new shorthands beyond the existing -h/-v — deliberately. Single-letter space collides here (-c checksum vs connect, -d debug vs dry-run), and fsend favors explicit, discoverable flags.

Testing

TestBoldHelpHeaders updated for the new section names; full go test ./..., gofmt, and a Windows cross-compile pass. Verified the rendered --help output by hand.

🤖 Generated with Claude Code

Replace the COMMON/ADVANCED split — which mixed send- and receive-only
flags in one long list — with SENDING / RECEIVING / GENERAL / ADVANCED,
matching the tool's send-or-receive model and the usage docs. A user now
jumps straight to their mode instead of scanning past the other half's
flags, and the occasional ones (--dry-run, --checksum) sit with their
mode rather than padding a "common" shortlist.

Also list the -h / --help and -v / --version shorthands, which already
work but weren't shown. Header bolding is generic (any ALL-CAPS line), so
the new section names need no logic change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@polius
polius merged commit 3f0b210 into main Jun 25, 2026
20 checks passed
@polius
polius deleted the feat/help-flag-grouping branch June 25, 2026 11:06
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.

1 participant