summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-29 22:06:15 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-29 22:06:15 -0500
commit074afad50320b984f81420954b4966c5a92a55d8 (patch)
tree08017d3f0bd070d30e8d1f47f07b683158816be4 /docs
parentafd75642be1fe8fc6b94d6ee82d5395ea78b0e84 (diff)
downloadcmd2-git-074afad50320b984f81420954b4966c5a92a55d8.tar.gz
Addressed PR comments
Diffstat (limited to 'docs')
-rw-r--r--docs/features/os.rst23
1 files changed, 17 insertions, 6 deletions
diff --git a/docs/features/os.rst b/docs/features/os.rst
index f042664c..d3e9b205 100644
--- a/docs/features/os.rst
+++ b/docs/features/os.rst
@@ -20,12 +20,15 @@ to type::
(Cmd) !ls -al
+NOTE: That ``cmd2`` provides user-friendly tab-completion throughout the
+process of running a shell command - first for the shell command name itself,
+and then for file paths in the argument section.
Editors
-------
-``cmd2`` includes the built-in ``edit`` command which uns a text editor and
-optionally open a file with it::
+``cmd2`` includes the built-in ``edit`` command which runs a text editor and
+optionally opens a file with it::
(Cmd) edit foo.txt
@@ -46,7 +49,14 @@ Output of any command can be displayed one page at a time using the
:meth:`~.cmd2.Cmd.ppaged` method.
Alternatively, a terminal pager can be invoked directly using the ability
-to run shell commands with the ``!`` shortcut.
+to run shell commands with the ``!`` shortcut like so::
+
+ (Cmd) !less foo.txt
+
+NOTE: Once you are in a terminal pager, that program temporarily has control
+of your terminal, **NOT** ``cmd2``. Typically you can use either the arrow
+keys or <PageUp>/<PageDown> keys to scroll around or type ``q`` to quit the
+pager and return control to your ``cmd2`` application.
Exit codes
----------
@@ -147,9 +157,10 @@ when it would be useful to use a ``cmd2`` application as a run-and-done
command-line utility for purposes of automation and scripting.
This is easily achieved by combining the following capabilities of ``cmd2``:
-1. Ability to invoke a ``cmd2`` application with arguments
-1. Ability to set an exit code when leaving a ``cmd2`` application
-1. Ability to exit a ``cmd2`` application with the ``quit`` command
+
+#. Ability to invoke a ``cmd2`` application with arguments
+#. Ability to set an exit code when leaving a ``cmd2`` application
+#. Ability to exit a ``cmd2`` application with the ``quit`` command
Here is a simple example which doesn't require the quit command since the
custom ``exit`` command quits while returning an exit code::