README
changeset 144 c66e1ada4c08
parent 135 444518c54a66
child 145 6dc40423b257
--- a/README	Sat Nov 06 12:14:40 2010 -0700
+++ b/README	Fri Dec 03 11:53:57 2010 -0800
@@ -20,10 +20,10 @@
 
   @command(usage='%name [-n] MESSAGE')
   def main(message,
-           nonewline=('n', False, 'don\'t print a newline')):
+           no_newline=('n', False, 'don\'t print a newline')):
       'Simple echo program'
       sys.stdout.write(message)
-      if not nonewline:
+      if not no_newline:
           sys.stdout.write('\n')
 
   if __name__ == '__main__':
@@ -37,13 +37,20 @@
 
   options:
 
-   -n --nonewline  don't print a newline
-   -h --help       show help
+   -n --no-newline  don't print a newline
+   -h --help        show help
 
-I think this mostly describes what's going on, except that I'd like to mention
-one interesting feature - if you are using long name for option, you can use
-only partial name, for example ``./echo.py --nonew`` a is valid command
-line. This is also true for subcommands: read about that and everything else
-you'd like to know in `documentation`_.
+As you can see, here we have defined option to not print newline: keyword
+argument name is a long name for option, default value is a 3-tuple, containing
+short name for an option (can be empty), default value (on base of which
+processing is applied - `see description`_) and a help string.
+
+Underscores in long names are converted into dashes.
+
+If you are calling a command with option using long name, you can supply it
+partially. In this case it could look like ``./echo.py --nonew``. This is also
+true for subcommands: read about them and everything else you'd like to know in
+`documentation`_.
 
 .. _documentation: http://hg.piranha.org.ua/opster/docs/
+.. _see description: http://hg.piranha.org.ua/opster/docs/overview.html#options-processing