svn commit: r234577 - head/usr.bin/stat

Bruce Evans brde at optusnet.com.au
Thu Jun 21 16:37:37 UTC 2012


On Thu, 21 Jun 2012, Steve Kargl wrote:

> On Thu, Jun 21, 2012 at 10:45:41AM +0200, Christian Brueffer wrote:
>> On 4/22/12 20:45 , Steve Kargl wrote:
>>> On Sun, Apr 22, 2012 at 06:18:49PM +0000, Christian Brueffer wrote:
>>>> Author: brueffer
>>>> Date: Sun Apr 22 18:18:49 2012
>>>> New Revision: 234577
>>>> URL: http://svn.freebsd.org/changeset/base/234577
>>>>
>>>> Log:
>>>>   Remove duplicate -l description.
>>>>
>>>>   Submitted by:	Rainer Hurling <rhurlin at gwdg.de>
>>>>   MFC after:	1 week
>>>
>>> The patch should have also fixed the misordering
>>> of the -n, -qi, and -x options.
>>
>> sorry for the late reply.  Could you say more specifically how you
>> would arrange the order?  From a small sampling of our manpages, it
>> seems we don't have "one true" style of ordering options (except from
>> alphabetically, see attached patch).
>>
>> Some manpages order A-Z, then a-z, while others (Apple and OpenBSD seem
>> to do this) order AaBb...Zz.

I think the latter is more common and correct for FreeBSD too.  ps uses
it.  But ls uses A-Za-z0-9.

> Upon further inspection, the order of the description of the
> options follows the order of the option in the SYNOPSIS.  I
> suppose the manpage is fine.

No, SYNOPSEs (and usage) normally put options with parameters last.
DESCRIPTIONs of options shouldn't do that.  For ls, there is only 1
option with a parameter (-D).  This is sorted into A-Z in the
DESCRIPTION section.  For ps, there are many options with parameters.
These used to be sorted after the ones without args in the SYNOPSEs,
but -O and -o are now unsorted before all other options with parameters.
The DESCRIPTION section in ps used to be sorted, but -c was added out
of order.

stat(1) has a sorted SYNOPSIS, with complications for -f that require
grouping it with options that don't take pararmeters.  These complications
affect the DESCRIPTION section too much.  Man pages like chmod(1) don't
unsort the DESCRIPTION section for similar things (the SYNOPSIS says
[-R [-H | -L | -P][, but the DESCRIPTION uses alphabetical ordering for
-HLPR.

Bruce


More information about the svn-src-all mailing list