bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: help2man and indented help text]


From: Brendan O'Dea
Subject: Re: address@hidden: help2man and indented help text]
Date: Wed, 24 Nov 2004 00:24:59 +1100
User-agent: Mutt/1.5.6+20040907i

On Sat, Nov 20, 2004 at 07:22:05PM +0100, Alfred M. Szmidt wrote:
>   Guessing which lines are continuations and which are new lines is
>   darned tricky, and the rules help2man uses are intended to deal
>   with the majority of cases.
>
>I don't know how help2man does this in detail, but wouldn't it work
>just to see if the next line as a option (either, -s or --short).  And
>assume that if doesn't, that it is a continuation?  This would solve
>all cases I think.

Perhaps, although it's been my experience that mucking with the logic to
fix once case breaks another.

There are conceivably cases where options are interspersed with text
that is not meant to be part of the option description.

>Then even something like:
>
>       -v, --very-long-option-name
>                          is described on this line,
>                            and this one...
>
>                            more text...
>                          even more text
>
>Would work; since we only stop scanning when we come to a new option.

I'm not quite sure why you'd actually *want* to do this, and taking the
two real-world examples from the initial report, I don't believe that
the current output is clearer, or more consistent than:

  -S                         sort by file size
      --sort=WORD            extension -X, none -U, size -S, time -t,
                               version -v, status -c, time -t, atime -u,
                               access -u, use -u

[...]

  -H, --dereference-command-line
                               follow symbolic links listed on the command line
      --dereference-command-line-symlink-to-dir
                               follow each command line symbolic link
                               that points to a directory

--bod




reply via email to

[Prev in Thread] Current Thread [Next in Thread]