Skip to content

Conversation

@keegancsmith
Copy link
Member

Previously we special cased --help only for the first level of subcommands. However, this broke for example if you did "src snapshot upload --help". So instead we normalize our command line arguments so that if a user does "--help" we see "-help". We can then rely on go's stdlib flag parser to do the right thing w.r.t. sub commands/etc.

Test Plan: ran with --help in a few different places and observed good behaviour.

Alternative to #1190

@keegancsmith
Copy link
Member Author

@marcleblanc2 if you are happy with this change, feel free to merge it in.

@marcleblanc2 marcleblanc2 force-pushed the k/alternative-help branch 2 times, most recently from ffa458c to 8b1392f Compare November 11, 2025 20:58
Previously we special cased --help only for the first level of
subcommands. However, this broke for example if you did "src snapshot
upload --help". So instead we normalize our command line arguments so
that if a user does "--help" we see "-help". We can then rely on go's
stdlib flag parser to do the right thing w.r.t. sub commands/etc.

Test Plan: ran with --help in a few different places and observed good
behaviour.
@marcleblanc2
Copy link
Contributor

Whoops, accidentally merged main into this branch, fixed by reverting the merge commit and rebased your commit on top of main.

@marcleblanc2 marcleblanc2 enabled auto-merge (squash) November 11, 2025 20:59
@marcleblanc2 marcleblanc2 merged commit 85fc546 into main Nov 11, 2025
10 checks passed
@marcleblanc2 marcleblanc2 deleted the k/alternative-help branch November 11, 2025 21:03
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.

4 participants