git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* is the standard "[<options>]", and not "[options]" or other?
@ 2018-05-24 11:45 Robert P. J. Day
  2018-05-24 19:15 ` Stefan Beller
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2018-05-24 11:45 UTC (permalink / raw)
  To: Git Mailing list


  more pedantry -- was digging through "man git-diff" and noticed the
inconsistency in how options are represented. first, in the synopsis,
you see "[options]":

  SYNOPSIS
    git diff [options] [<commit>] [--] [<path>...]
    git diff [options] --cached [<commit>] [--] [<path>...]
    git diff [options] <commit> <commit> [--] [<path>...]
    git diff [options] <blob> <blob>
    git diff [options] [--no-index] [--] <path> <path>

while just below that in DESCRIPTION, it's all "[--options]":

  git diff [--options] [--] [<path>...]
           ^^^^^^^^^^^

a further search produced this from RelNotes/2.7.0.txt:

  "A couple of commands still showed "[options]" in their usage string
   to note where options should come on their command line, but we
   spell that "[<options>]" in most places these days."

so, "git diff -h" does in fact use the allegedly encouraged syntax:

  $ git diff -h
  usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
  $

but should the man pages be updated similarly? i can whip up a patch
for that unless someone wants to comment on this further.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: is the standard "[<options>]", and not "[options]" or other?
  2018-05-24 11:45 is the standard "[<options>]", and not "[options]" or other? Robert P. J. Day
@ 2018-05-24 19:15 ` Stefan Beller
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2018-05-24 19:15 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list

On Thu, May 24, 2018 at 4:45 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:

>
> but should the man pages be updated similarly? i can whip up a patch
> for that unless someone wants to comment on this further.

Yes, please!

I think [<options>] are the best, as they are pedantically correct.
[--options] is the worst, as there is not such thing as --options.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-24 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24 11:45 is the standard "[<options>]", and not "[options]" or other? Robert P. J. Day
2018-05-24 19:15 ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).