diff options
author | kotfu <kotfu@kotfu.net> | 2019-07-02 19:02:36 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2019-07-02 19:02:36 -0600 |
commit | 92ae130c38520b249eb7351cfb0da1ad67d3d3cf (patch) | |
tree | a403641a1a9412b19e26b52fae83635d812f9409 /docs/migrating/incompatibilities.rst | |
parent | 80950bfa4216ed20df5d63f1ebe63bac5b3746b4 (diff) | |
download | cmd2-git-92ae130c38520b249eb7351cfb0da1ad67d3d3cf.tar.gz |
Major overhaul of documentation structure for #709
Diffstat (limited to 'docs/migrating/incompatibilities.rst')
-rw-r--r-- | docs/migrating/incompatibilities.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/migrating/incompatibilities.rst b/docs/migrating/incompatibilities.rst new file mode 100644 index 00000000..3d7ddcfb --- /dev/null +++ b/docs/migrating/incompatibilities.rst @@ -0,0 +1,21 @@ +Incompatibilities +================= + +.. _cmd: https://docs.python.org/3/library/cmd.html + +``cmd2`` strives to be drop-in compatible with cmd_, however there are a few things +that are not. + + +cmd.emptyline() +--------------- + +The `cmd.emptyline() +<https://docs.python.org/3/library/cmd.html#cmd.Cmd.emptyline>`_ function 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 behavior 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 overridden. |