git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Git Mailing list <git@vger.kernel.org>
Subject: aesthetic standard for synopsis line of man pages?
Date: Sun, 12 Nov 2017 15:48:10 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.21.1711121537440.7324@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 2765 bytes --]


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

  from "man git-clean":

  SYNOPSIS
       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:

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

  ... snip ...

  OPTIONS

       -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.

       -r
           Allow recursive removal when a leading directory name is
           given.

       --
           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).

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

       --ignore-unmatch
           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.

rday

-- 

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

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

                 reply	other threads:[~2017-11-12 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.1711121537440.7324@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).