support --help anywhere on command line by keegancsmith · Pull Request #1195 · sourcegraph/src-cli

burmudar

@keegancsmith @marcleblanc2

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.