Web lists-archives.com

aesthetic standard for synopsis line of man pages?

  yet more aesthetic nitpickery ... was just perusing the man pages of
both "git clean" and "git rm", and noticed some striking

  from "man git-clean":

       git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...

note how, in that sypnosis, even those options that are represented by
both a short form option (-f) and a corresponding long form (--force)
use only the short form in the synopsis, i'm assuming for brevity,
which makes perfect sense.

  "man git-rm" is a different beast entirely, with a hodge podge of
short forms and long forms with no apparent pattern:

       git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>...

  ... snip ...


       -f, --force
           Override the up-to-date check.

       -n, --dry-run
           Donʼt actually remove any file(s). Instead, just show if
           they exist in the index and would otherwise be removed by
           the command.

           Allow recursive removal when a leading directory name is

           This option can be used to separate command-line options
           from the list of files, (useful when filenames might be
           mistaken for command-line options).

           Use this option to unstage and remove paths only from the
           index. Working tree files, whether modified or not, will
           be left alone.

           Exit with a zero status even if no files matched.

       -q, --quiet
           git rm normally outputs one line (in the form of an rm
           command) for each file removed. This option suppresses
           that output.

  the strangeness above?

1) the synopsis itself lists the alternatives "[-f | --force]", which
seems unnecessary, as both forms are listed under OPTIONS

2) this is followed by *only* the short form (-n) of --dry-run, so
that's inconsistent

3) the SYNOPSIS weirdly includes *only* the long form (--quiet) rather
than the short form (-q)

4) is it standard to explain the "--" separator in a man page? i
don't recall seeing that in any other man page, but maybe i wasn't
paying attention. it seems unnecessary.

  in short, "man git-clean" seems reasonable, while "man git-rm"
appears somewhat disorganized.



Robert P. J. Day                                 Ottawa, Ontario, CANADA

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