summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-12 18:29:51 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-12 18:29:51 -0500
commit2b049c4db4350f05f00cb290d132cbf95de36c66 (patch)
treef6219d42a6828bc8a3fcc9e22da8c254b07044e5
parentc8549139d3061a12d8583b844d8c7d7a235d980a (diff)
downloadcmd2-git-2b049c4db4350f05f00cb290d132cbf95de36c66.tar.gz
Documentation fixes and updates
- Fixed optparse links - Added note about plans to replace optparse with argparse - Added subsection about the functions which control argument parsing for commands with flags
-rw-r--r--docs/unfreefeatures.rst25
1 files changed, 23 insertions, 2 deletions
diff --git a/docs/unfreefeatures.rst b/docs/unfreefeatures.rst
index 48e6fb7c..84314689 100644
--- a/docs/unfreefeatures.rst
+++ b/docs/unfreefeatures.rst
@@ -17,6 +17,7 @@ terminators. A blank line
is *always* considered a command terminator
(cannot be overridden).
+
Parsed statements
=================
@@ -77,6 +78,7 @@ to *use* ``arg.parsed``.)
.. _pyparsing: http://pyparsing.wikispaces.com/
+
Environment parameters
======================
@@ -189,9 +191,25 @@ the option's online help.
-h, --help show this help message and exit
-t, --train by train
-.. _optparse:
+Controlling how arguments are parsed for commands with flags
+------------------------------------------------------------
+There are three functions which can globally effect how arguments are parsed for commands with flags:
+
+.. autofunction:: cmd2.set_posix_shlex
+
+.. autofunction:: cmd2.set_strip_quotes
+
+.. autofunction:: cmd2.set_use_arg_list
+
+.. note::
+
+ Since optparse_ has been deprecated since Python 3.2, the ``cmd2`` developers plan to replace optparse_ with
+ argparse_ in the next version of ``cmd2``. We will endeavor to keep the API as identical as possible when this
+ change occurs.
+
+.. _optparse: https://docs.python.org/3/library/optparse.html
+.. _argparse: https://docs.python.org/3/library/argparse.html
-.. _outputters:
poutput, pfeedback, perror
==========================
@@ -204,6 +222,7 @@ instead. These methods have these advantages:
- More concise
- ``.pfeedback()`` destination is controlled by :ref:`quiet` parameter.
+
color
=====
@@ -213,6 +232,7 @@ Text output can be colored by wrapping it in the ``colorize`` method.
.. _quiet:
+
quiet
=====
@@ -221,6 +241,7 @@ useful for non-essential feedback that the user may not always want
to read. ``quiet`` is only relevant if
``app.pfeedback`` is sometimes used.
+
select
======