git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Michael Witten <mfwitten@mit.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/8] Docs: send-email: Man page option ordering
Date: Mon, 29 Sep 2008 02:10:31 +0200	[thread overview]
Message-ID: <200809290210.33880.jnareb@gmail.com> (raw)
In-Reply-To: <FB3A852B-728F-4183-A5AF-BA8F8D995AD7@mit.edu>

On Sun, 28 Sep 2008 21:04, Michael Witten wrote:
> On 28 Sep 2008, at 3:08 AM, Jakub Narebski wrote:
>> Michael Witten wrote:
>>
>>> Now the man page lists the options in alphabetical
>>> order (in terms of the 'main' part of an option's
>>> name).
>>
>> I know it is a matter of taste, but I prefer having options
>> on man page in functional order, grouped by function, perhaps
>> with subsections to group them (c.f. git-rev-list man page).
> 
> See: http://marc.info/?l=git&m=122246885210923&w=2

You meant the following comment by  Jeff King?

peff>   4/6: I am not sure about making the order of options the same, 
peff>        the two formats serve different purposes. I think
peff>        "git send-email --foo" should present the options based on
peff>        commonality of use. You clearly got the usage wrong, so
peff>        I think it is helping you to figure out quickly what you
peff>        probably  meant. 

This agrees with Gnits (GNU Coding Standard expanded) about --help
http://www.gnu.org/software/womb/gnits/Help-Output.html#Help-Output

# When a program has many options, try regrouping options logically,
  instead of listing them all alphabetically (say), as the mere
  regrouping is a succint way to convey much information. Present each
  group of options in its own subtable, suitably introduced by some few
  words. Separate groups by white lines for making the overall structure
  more easy to grasp by the reader. Here is an excerpt from a relatively
  big `--help' output:

       Main operation mode:
          -t, --list              list the contents of an archive
          -x, --extract, --get    extract files from an archive
          -c, --create            create a new archive
          -d, --diff, --compare   find differences between archive and file system
          -r, --append            append files to the end of an archive
          -u, --update            only append files newer than copy in archive
          -A, --catenate          append tar files to an archive
              --concatenate       same as -A
              --delete            delete from the archive (not on mag tapes!)
          
        Device blocking:
          -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record
              --record-size=SIZE         SIZE bytes per record, multiple of 512
          -i, --ignore-zeros             ignore zeroed blocks in archive (means EOF)
          -B, --read-full-records        reblock as we read (for 4.2BSD pipes)


peff>    The manpage, on the other hand, is a comprehensive reference
peff>    and so should probably be alphabetized for easy reading.
 
I haven't found definitive guide or definitive suggestion whether
options in man page should be alphabetized or put in some functional
order. GNU Coding Standards doesn't say anything; at least I haven't
found anything on this topic.

First, git lacks structured texinfo documentation, so manpages serves
_both_ as reference, and _as learning tool_. For learning you would
want options grouped by function, perhaps sorted alphabetically in
group. If you want to find some option, you can always use search
and incremental search capabilities of manpages pager.

Second, large manpages with large number of options are usually divided
into sections, see git-rev-list(1) manpage, or rpmbuild(8) manpage. So
there is precedent for that. And I think it is good precedent.

-- 
Jakub Narebski
Poland

  reply	other threads:[~2008-09-29  0:11 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28  1:09 [PATCH 1/8] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-28  1:09 ` [PATCH 2/8] Docs: send-email usage text much sexier Michael Witten
2008-09-28  1:09   ` [PATCH 3/8] Docs: send-email: Man page option ordering Michael Witten
2008-09-28  1:09     ` [PATCH 4/8] send-email: change --no-validate to boolean --[no-]validate Michael Witten
2008-09-28  1:09       ` [PATCH 5/8] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-28  1:09         ` [PATCH 6/8] Docs: Arranged config options in man page Michael Witten
2008-09-28  1:09           ` [PATCH 7/8] Docs: send-email: Added all config variables to man end Michael Witten
2008-09-28  1:09             ` [PATCH 8/8] Docs: config: send-email config options included Michael Witten
2008-09-28  3:24               ` Jeff King
2008-09-28 19:03                 ` Michael Witten
2008-09-28 19:06                   ` Jeff King
2008-09-28  3:18             ` [PATCH 7/8] Docs: send-email: Added all config variables to man end Jeff King
2008-09-28 19:03               ` Michael Witten
2008-09-28 19:08                 ` Jeff King
2008-09-28  3:15           ` [PATCH 6/8] Docs: Arranged config options in man page Jeff King
2008-09-28 19:03             ` Michael Witten
2008-09-28  4:51       ` [PATCH] bash completion: Add --[no-]-validate to "git send-email" Teemu Likonen
2008-09-28 12:55         ` Teemu Likonen
2008-09-28  8:08     ` [PATCH 3/8] Docs: send-email: Man page option ordering Jakub Narebski
2008-09-28 19:04       ` Michael Witten
2008-09-29  0:10         ` Jakub Narebski [this message]
2008-09-29  0:36           ` Jeff King
2008-09-29  5:08             ` [RFC 6/9] Docs: send-email: Remove unnecessary config variable description Michael Witten
2008-09-29  5:08               ` [RFC 7/9] send-email: Completely replace --signed-off-cc with --signed-off-by-cc Michael Witten
2008-09-29  5:08                 ` [RFC 8/9] Docs: send-email: Create logical groupings for --help text Michael Witten
2008-09-29  5:08                   ` [RFC 9/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-29 16:25                   ` [RFC 8/9] Docs: send-email: Create logical groupings for --help text Jeff King
     [not found]             ` <1222664781-55763-1-git-send-email-mfwitten@mit.edu>
     [not found]               ` <1222664781-55763-2-git-send-email-mfwitten@mit.edu>
2008-09-29 16:29                 ` [RFC 7/9] send-email: Completely replace --signed-off-cc with --signed-off-by-cc Jeff King
2008-09-29 17:41                   ` [RFC2 8/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-29 17:41                     ` [RFC2 9/9] send-email: signedoffcc -> signedoffbycc, but handle both Michael Witten
2008-09-29 17:44                       ` Jeff King
2008-09-30 12:58                         ` [PATCH 1/9] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-30 12:58                           ` [PATCH 2/9] Docs: send-email usage text much sexier Michael Witten
2008-09-30 12:58                             ` [PATCH 3/9] Docs: send-email: Man page option ordering Michael Witten
2008-09-30 12:58                               ` [PATCH 4/9] send-email: change --no-validate to boolean --[no-]validate Michael Witten
2008-09-30 12:58                                 ` [PATCH 5/9] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-30 12:58                                   ` [PATCH 6/9] Docs: send-email: Remove unnecessary config variable description Michael Witten
2008-09-30 12:58                                     ` [PATCH 7/9] Docs: send-email: Create logical groupings for --help text Michael Witten
2008-09-30 12:58                                       ` [PATCH 8/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-30 12:58                                         ` [PATCH 9/9] send-email: signedoffcc -> signedoffbycc, but handle both Michael Witten
2008-10-01  3:27                               ` [PATCH 3/9] Docs: send-email: Man page option ordering Jeff King
2008-10-01 20:34                                 ` Michael Witten
2008-10-01 20:36                                   ` Shawn O. Pearce
2008-09-28  5:08 ` [PATCH 1/8] Docs: send-email's usage text and man page mention same options Miklos Vajna
2008-09-28 19:04   ` Michael Witten

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

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

  git send-email \
    --in-reply-to=200809290210.33880.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mfwitten@mit.edu \
    /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.
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 NNTP newsgroup(s).