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

Re: verifying syntax for optional and replaceable content in man pages

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
May 30, 2018, 18:08 UTC
Message-ID
<alpine.LFD.2.21.1805301405200.9810@localhost.localdomain>
In-Reply-To
<CAGZ79kbdbV8r6Vr06ECOy9XXnBO_r=F-XcQU3WCCtOuCr0cfiQ@mail.gmail.com>
On Wed, 30 May 2018, Stefan Beller wrote:
Show 20 quoted lines
> On Wed, May 30, 2018 at 4:39 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> >   willing to submit some patches to standardize the syntax of man
> > pages in terms of rendering "optional" and/or "replaceable"
> > content, and it seems like "man git-config" would be a good place
> > to start:
> >
> > SYNOPSIS
> >        git config [<file-option>] [type] [--show-origin] [-z|--null] name [value [value_regex]]
> >        git config [<file-option>] [type] --add name value
> >        git config [<file-option>] [type] --replace-all name value [value_regex]
> >        ...snip ...
> >
> >   can i assume the proper (uniform) syntax for the above would be
> > (shortening lines):
> >
> >   ... [<type>] [--show-origin] [-z|--null] <name> [<value> [<value_regex>]]
>
> So the difference are the angle brackets around 'name', otherwise no
> change?
  more precisely, angle brackets would represent any "replaceable"
content, regardless of where it occurs.
>
> >   ... [<type>] --add <name> <value>
>
> all the same but angle brackets around name and value,
  same rationale as above, [<...>] would represent both optional *and*
replaceable content. and so on, and so on.
  the only other obvious inconsistency i've seen is, when referring to
an environment variable, i've seen both of:
  `VARIABLE`
  `$VARIABLE`

my personal preference is the one without the $ if just referring to the variable, without trying to dereference it. but that's just me.

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

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Previous: Stefan Beller
Message 3 of 3 in “verifying syntax for optional and replaceable content in man pages”
  1. Robert P. J. DayMay 30, 2018
  2. Stefan BellerMay 30, 2018
  3. Robert P. J. DayMay 30, 2018

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.