summaryrefslogtreecommitdiff
path: root/docs/migrating/why.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/migrating/why.rst')
-rw-r--r--docs/migrating/why.rst44
1 files changed, 39 insertions, 5 deletions
diff --git a/docs/migrating/why.rst b/docs/migrating/why.rst
index 1561bb91..5445b03f 100644
--- a/docs/migrating/why.rst
+++ b/docs/migrating/why.rst
@@ -1,5 +1,5 @@
-Why Migrate to cmd2
-===================
+Why cmd2
+========
.. _cmd: https://docs.python.org/3/library/cmd.html
@@ -7,17 +7,19 @@ cmd
---
cmd_ is the Python Standard Library's module for creating simple interactive
-command-line applications.
-cmd_ is an extremely bare-bones framework which leaves a lot to be desired. It
-doesn't even include a built-in way to exit from an application!
+command-line applications. cmd_ is an extremely bare-bones framework which
+leaves a lot to be desired. It doesn't even include a built-in way to exit
+from an application!
Since the API provided by cmd_ provides the foundation on which ``cmd2`` is
based, 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_.
+
cmd2
----
+
``cmd2`` is a batteries-included extension of cmd_, which provides a wealth of
functionality to make it quicker and easier for developers to create
feature-rich interactive command-line applications which delight customers.
@@ -42,3 +44,35 @@ include:
* Both Python and ASCII text application scripting is built-in
* Ability to run non-interactively for automation purposes
+
+Free Features
+-------------
+
+After switching from cmd_ to ``cmd2``, your application will have the following
+new features and capabilities, without you having to do anything:
+
+- More robust :ref:`features/history:History`. Both cmd_ and ``cmd2`` have readline
+ history, but ``cmd2`` also has a robust ``history`` command which allows you
+ to edit prior commands in a text editor of your choosing, re-run multiple
+ commands at a time, and save prior commands as a script to be executed later.
+
+- Users can load script files, which contain a series of commands
+ to be executed.
+
+- Users can create :ref:`features/shortcuts_aliases_macros:Shortcuts, Aliases,
+ and Macros` to reduce the typing required for repetitive commands.
+
+- Embedded python shell allows a user to execute python code from within your
+ ``cmd2`` app. How meta.
+
+- :ref:`features/clipboard:Clipboard Integration` allows you to save command
+ output to the operating system clipboard.
+
+- A built-in :ref:`features/misc:Timer` can show how long it takes a command to
+ execute
+
+- A :ref:`Transcript <features/transcripts:Transcripts>` is a file which
+ contains both the input and output of a successful session of a
+ ``cmd2``-based app. The transcript can be played back into the app as a unit
+ test.
+