From 83f62cd6767810382e5a70ec6d0974ef661fc26b Mon Sep 17 00:00:00 2001 From: kotfu Date: Sun, 14 Jul 2019 00:06:20 -0600 Subject: Lots of work on the migrating documentation for #719 --- docs/migrating/why.rst | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to 'docs/migrating/why.rst') 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 ` 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. + -- cgit v1.2.1