On Tue, Nov 15, 2005 at 09:42:59AM -0700, Bob Proulx wrote:
> Enrico Zini wrote:
> > I don't think that one more one-line example would make the manpage
> > unreadable.
> For you it is a single line example.  For the other person it is a
> single line example.  For any particular person it is not a problem.
> But for everyone it is a single line example.  After you add one
> example for everyone the manpage is then unreadable.

I've never heard anyone complaining about a manpage being unreadable
because it has too many _examples_.  I've heard people complaining about
manpages having too little examples, though.
Plus, we are talking about a manpage which has no examples at all.  You
must be kidding me.


> > If the main information is kept on info, then the manpage could really
> > be made into a quick-reference sheet.  No explanations (refers to Info
> > for that) and quick summary of commandline options and format sequences
> > (as we have now), plus a bunch of one-line useful examples.
> That is mostly the way things are now.  The man pages are generated
> automatically with 'help2man' from the --help output.  This keeps the
> man page up to date with the program.

If the problem is that you don't control the contents of the manpage
because it's automatically generated by help2man, please tell it right
away without trying to convince me I'm asking something unreasonable.

Now, if the problem is help2man, then I wouldn't solve it by asking
upstream to adding examples to date --help (which would indeed mess up
even more the already verbose output), but to use help2man --include.

You can save this file as debian/date.examples, then run help2man as:

  help2man --include debian/date.examples date

and help2man will include the section in the generated manpage.

----------------------------------------------------------------------
[EXAMPLES]
.nf
# Print the date of two days ago
date --date ´2 days ago´

# Print the name of the weekday of Christmas in this year
date --date ´25 Dec´ +%j

# Print the current day in a format that includes the complete name of the
# month, and the weekday
date ´+%B %d´

# Print the same, without the padding with zeros ("1" instead of "01")
date -d 1-may ´+%B %-d´

# Print the current date as unix timestamp
date +%s

# Parse a unix timestamp
date -d "@1123341579"
.fi
----------------------------------------------------------------------


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to