git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 5 of 11 in “cli: add -v and -h shorthands”
  1. cli: add -v and -h shorthandsGarrit Franke, Mar 30, 2022
  2. Junio C HamanoMar 30, 2022
  3. Garrit FrankeMar 30, 2022
  4. Ævar Arnfjörð BjarmasonMar 31, 2022
  5. Garrit FrankeMar 31, 2022
  6. Junio C HamanoMar 31, 2022
  7. Ævar Arnfjörð BjarmasonApr 1, 2022
  8. Junio C HamanoApr 1, 2022
  9. Garrit FrankeApr 4, 2022
  10. Junio C HamanoApr 4, 2022
  11. cli: add -v and -h shorthandsGarrit Franke, Mar 31, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.