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: Sat, 20 Nov 2004 17:08:12 +1100
User-agent: Mutt/1.5.6+20040907i

On Fri, Nov 19, 2004 at 11:12:39PM +0100, Alfred M. Szmidt wrote:
>help2man produces spurious blank newlines if you indented the --help
>text like this:
>
>      --sort=WORD            extension -X, none -U, size -S, time -t,
>                               version -v
>                             status -c, time -t, atime -u, access -u, use -u
>
>The output that help2man produces ends up looking like this:
>
>       --sort=WORD
>              extension -X, none -U, size -S, time -t, version -v
>
>              status -c, time -t, atime -u, access -u, use -u
>
>Or if you have,
>
>      --dereference-command-line-symlink-to-dir
>                             follow each command line symbolic link
>                               that points to a directory
>
>then you get
>
>       --dereference-command-line-symlink-to-dir
>              follow each command line symbolic link
>
>              that points to a directory
>
>
>Indenting the --help string in this was is very useful, since it makes
>it easier to read.  Could someone take a look at this?

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.

When option descriptions are continued on the following line, the indent
need not be the same as the first line, but it must be consistent on all
continuation lines (and >= 20 chars).

So for example, these are OK:

    -o, --option=VALUE  text starts on this line,
                        continues here...
    -o, --option=VALUE  text starts on this line,
                          continues here...
                          and here...

as is this:

    -v, --very-long-option-name
                          is described on this line,
                          and this one...

The following however will break:

    -o, --option=VALUE  text starts on this line,
                        continues here...
                          and here...
    -v, --very-long-option-name
                        is described on this line,
                          and this one...

--bod




reply via email to

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