summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-01-30 23:56:07 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-01-30 23:56:07 -0500
commitb66837ed3a11bbee7eb98da8b95e0f58eec533bf (patch)
treeecee4400982c272ee654fa2ffc617402598f1a2e /docs
parent450b7b37ef92fa529d07c9d348aaae4a5c036f9f (diff)
downloadcmd2-git-b66837ed3a11bbee7eb98da8b95e0f58eec533bf.tar.gz
Added a couple notes in the docs:
1) Note about needing GNU Readline or equivalent for tab-completion to work 2) Note about behavior occurring when and empty line is entered is different from parent cmd module
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst7
-rw-r--r--docs/overview.rst14
2 files changed, 19 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst
index ca5e8870..eba90e0b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -30,6 +30,13 @@ The basic use of ``cmd2`` is identical to that of cmd_.
app = App()
app.cmdloop()
+.. note::
+
+ The tab-completion capability provided by cmd_ relies on underlying capability provided by GNU readline or an
+ equivalent library. Linux distros will almost always come with the required library installed.
+ For Mac OS X, we recommend installing the `gnureadline <https://pypi.python.org/pypi/gnureadline>`_ Python module.
+ For Windows, we recommend installing the `pyreadline <https://pypi.python.org/pypi/pyreadline>`_ Python module.
+
Resources
---------
diff --git a/docs/overview.rst b/docs/overview.rst
index cb0c80eb..52f46fef 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -4,7 +4,7 @@ Overview
========
``cmd2`` is an extension of cmd_, the Python Standard Library's module for
-creating simple interactive command-line applications.
+creating simple interactive command-line applications.
``cmd2`` can be used as a drop-in replacement for cmd_. Simply importing ``cmd2``
in place of cmd_ will add many features to an application without any further
@@ -14,4 +14,14 @@ Understanding the use of cmd_ is the first step in learning the use of ``cmd2``.
Once you have read the cmd_ docs, return here to learn the ways that ``cmd2``
differs from cmd_.
-.. _cmd: http://docs.python.org/library/cmd.html \ No newline at end of file
+.. note::
+
+ ``cmd2`` is not quite a drop-in replacement for cmd_.
+ The `cmd.emptyline() function <https://docs.python.org/3/library/cmd.html#cmd.Cmd.emptyline>`_ is called
+ when an empty line is entered in response to the prompt. By default, in cmd_ if this method is not overridden, it
+ repeats and executes the last nonempty command entered. However, no end user we have encountered views this as
+ expected or desirable default behavior. Thus, the default behvior in ``cmd2`` is to simply go to the next line
+ and issue the prompt again. At this time, cmd2 completely ignores empty lines and the base class cmd.emptyline()
+ method never gets called and thus the emptyline() behavior cannot be overriden.
+
+.. _cmd: http://docs.python.org/library/cmd.html