[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: help2man and indented help text]
From: |
Alfred M. Szmidt |
Subject: |
Re: address@hidden: help2man and indented help text] |
Date: |
Sat, 20 Nov 2004 19:22:05 +0100 |
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.
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.
Since we would just concatenate all the lines that do not have a
option listed. One might need to do a special execption for cases
when you have text that starts on the first column. I.e. something
like tar uses (and some of the Hurd I belive):
Informative output:
--help print this help, then exit
--version print tar program version number, then exit
-v, --verbose verbosely list files processed
But I think that this would work in more cases then the current algo
works. Also should be quite easy to implement.
Well, I haven't pondered about this any more, but what do you think?
Happy hacking.