Re: [PATCH v2] cli: add -v and -h shorthands
- From
Garrit Franke <garrit@slashdev.space>
- Date
- Mar 31, 2022, 13:08 UTC
- Message-ID
- <f3935840-e2a0-953e-0e7c-ac921d414ddc@slashdev.space>
- In-Reply-To
- <220331.86tubfrngz.gmgdl@evledraar.gmail.com>
On 31.03.22 02:07, Ævar Arnfjörð Bjarmason wrote:
Show 15 quoted lines
> > On Thu, Mar 31 2022, Garrit Franke wrote: > >> On Wed, Mar 30 2022, Junio C Hamano wrote: >> >>> Sorry, but it is unclear why it is a good thing. >> >> My main motivation behind this change was a standardized user >> experience across tools. Many users use these shorthands out of habit >> to get an overview of a program. Seeing the command fail and having to >> retype it in a longer form creates unnecessary friction between the >> user and the program. > > I think this is a good trade-off in this case. I.e. -v and -h are > commonly understood.
An interesting observation I just made is that curl [0] uses both "--verbose" and "--version" on the top level [1][2] including shorthands. "-v" corresponds to "verbose", "-V" corresponds to "version.
Not that I'm a fan of this clutter, but it's a possible path to go down if we actually needed a second shorthand using this letter.
[0]: https://github.com/curl/curl [1]: https://github.com/curl/curl/blob/master/docs/cmdline-opts/version.d [2]: https://github.com/curl/curl/blob/master/docs/cmdline-opts/verbose.d