Util-Linux package development
 help / color / mirror / Atom feed
* man-pages and usage() howto
@ 2011-08-15 14:19 Karel Zak
  2011-08-15 19:12 ` Sami Kerola
  0 siblings, 1 reply; 15+ messages in thread
From: Karel Zak @ 2011-08-15 14:19 UTC (permalink / raw)
  To: Benno Schulenberg, Sami Kerola; +Cc: util-linux


 Hi,

Sami is already working on some howtos, what we need is some
consensus about a way how describe options.

My suggestion:

 * argument required:

   -o, --option FILE    # usage()
   -o, --option file    # man page

 * optional argument:

   -o, --option[=FILE]  # usage()
   -o, --option[=file]  # man page


 * synopsis

   - without individual options, bad example:
   
        command [-o offset] [--sizelimit size] [-p pfd] [-r] file

   - [options] is better:

        command [options] file

   - use more synopsis lines if the command supports more separated modes.

       command --add file
       command --del file

     (use common sense! ... if there is too many modes, then use [options])

     The options specific to the mode are allowed in the synopsis or
     in the man page should be per-mode section with description about
     the options.


 * common options:

   -V, --version
   -h, --help

 * suggestions:

   -a, --all
   -o, --output <list>
   -r, --raw
   -f, --force
   -b, --bytes   (don't print SIZE in human readable format)


 * We also need any consensus about groff formatting, the ideal
   solution would be add any Documentation/example.man

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-08-23 19:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 14:19 man-pages and usage() howto Karel Zak
2011-08-15 19:12 ` Sami Kerola
2011-08-16  9:03   ` Benno Schulenberg
2011-08-16 10:46     ` Karel Zak
2011-08-17 13:07       ` Sami Kerola
2011-08-20  9:10         ` Benno Schulenberg
2011-08-20 19:08           ` Sami Kerola
2011-08-21 10:56             ` Sami Kerola
2011-08-22  8:16             ` Karel Zak
2011-08-22 18:53               ` Sami Kerola
2011-08-22 20:38             ` Benno Schulenberg
2011-08-23  8:15               ` Sami Kerola
2011-08-23 18:55                 ` Benno Schulenberg
2011-08-23 19:34                   ` Sami Kerola
2011-08-16 10:39   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox