Commits

larry  committed 106bd5b

More doc fixups.

  • Participants
  • Parent commits 8039026

Comments (0)

Files changed (1)

 (after the program) that doesn't start with a dash.
 This is how many modern programs operate, for example
 "svn", "hg", and "git"; for the command-line
-"hg clone foo bar", "clone" is a "command".
+``"hg clone foo bar"``, "clone" is a "command".
 
-"Options" are things that start with '-'.
+"Options" are things that start with ``'-'``.
 Single-character options always use a single dash,
-and can be grouped together ('-a -b -c' and '-abc'
+and can be grouped together (``'-a -b -c'`` and ``'-abc'``
 are equivalent).  Multiple-character options must
 use a double dash and must be specified separately.
 
 An option can itself take an argument.  This can be of
-the form '-n 3' or '-n=3' or '-n3'.  You can specify
+the form ``'-n 3'`` or ``'-n=3'`` or ``'-n3'``.  You can specify
 a single-letter option that takes an argument as part
-of a multiple option group ('-abc'), but it must be
-specified last ('-abcn5').
+of a multiple option group (``'-abc'``), but it must be
+specified last (``'-abcn5'``).
 
 There are two kinds of options: "global options", which apply
 to the program itself (or to all commands), and "command options"
 of your function as strings.  POK parameters that have
 no default are required.
 
-If your function takes a *args parameter, it will accept
+If your function takes a ``*args`` parameter, it will accept
 an arbitrary number of additional positional parameters.
 
 Keyword-only (KO) parameters in your Python function
 used as the name of the option.  Options are always
 optional; therefore, if your function specifies a
 KO parameter with no default, a default is inferred.
-By default, options are boolean, and default to False,
+By default, options are boolean, and default to ``False``,
 and specifying them on the command-line toggles
-them between True and False.
+them between ``True`` and ``False``.
 
 If a parameter to your callable has no default value,
 it is required, and therefore the option or argument
 * If the value is a callable, it will be used to "cast"
   a value from the command-line to a native Python type.
   The callable should behave as like a scalar type
-  constructor (str, bool, int):
+  constructor (``str``, ``bool``, ``int``):
 
-      * If called with no arguments, it should return a
-        reasonable 'default' value, preferably a false
-        value.
+  - If called with no arguments, it should return a
+    reasonable 'default' value, preferably a false
+    value.
 
-      * If called with a single positional argument
-        (which in DryParse will always be a string),
-        it should return a value.  The value should
-        theoretically represent the value of the
-        command-line parameter, converted to some
-        other type.
+  - If called with a single positional argument
+    (which in DryParse will always be a string),
+    it should return a value.  The value should
+    theoretically represent the value of the
+    command-line parameter, converted to some
+    other type.
 
 * If the value is a string starting with a dash,
   it's a whitespace-separated list of substrings
 
   These substrings are interpreted as follows:
 
-      * If the substring begins with a single dash
-        followed by an isalpha() character, this
-        argument will map to that single-character
-        option.  (This is only valid for
-        positional-only parameters.)
+  - If the substring begins with a single dash
+    followed by an ``isalpha()`` character, this
+    argument will map to that single-character
+    option.  (This is only valid for
+    positional-only parameters.)
 
-      * If the substring begins with two dashes
-        followed by two or more isalpha() characters,
-        this argument will map to that option.
-        (This is only valid for positional-only
-        parameters.)
+  - If the substring begins with two dashes
+    followed by two or more ``isalpha()`` characters,
+    this argument will map to that option.
+    (This is only valid for positional-only
+    parameters.)
 
-      * If the substring is a single asterisk
-        ('*'), this option must take a value, and
-        you may specify it any number of times.
-        DryParse will pass in a list containing
-        all the option values from the command-line
-        in order.
+  - If the substring is a single asterisk
+    (``'*'``), this option must take a value, and
+    you may specify it any number of times.
+    DryParse will pass in a list containing
+    all the option values from the command-line
+    in order.
 
-      * If the substring consists entirely of one
-        or two dashes, it is ignored.
+  - If the substring consists entirely of one
+    or two dashes, it is ignored.
 
 Testing
 =======