summaryrefslogtreecommitdiff
path: root/docs/transcript.rst
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-03-19 20:27:12 -0400
committerGitHub <noreply@github.com>2019-03-19 20:27:12 -0400
commit9f5906a5cc1128652f1b43545ae4c948e9a0fe2b (patch)
tree8e5e706742ae361443fc8a02d1037d8a9943c7ee /docs/transcript.rst
parente89bd4f5e70300251314117d3664ad92c9123ade (diff)
parent74d2d60fa8685df82d3348dd56b6f8413deac6c2 (diff)
downloadcmd2-git-9f5906a5cc1128652f1b43545ae4c948e9a0fe2b.tar.gz
Merge pull request #652 from python-cmd2/load_generate_transcript
Added load -t flag for recording a transcript based on a script file
Diffstat (limited to 'docs/transcript.rst')
-rw-r--r--docs/transcript.rst17
1 files changed, 14 insertions, 3 deletions
diff --git a/docs/transcript.rst b/docs/transcript.rst
index 36b35fcf..c7c31fd6 100644
--- a/docs/transcript.rst
+++ b/docs/transcript.rst
@@ -13,9 +13,9 @@ from commands that produce dynamic or variable output.
Creating a transcript
=====================
-Automatically
--------------
-A transcript can automatically generated based upon commands previously executed in the *history*::
+Automatically from history
+--------------------------
+A transcript can automatically generated based upon commands previously executed in the *history* using ``history -t``::
(Cmd) help
...
@@ -32,6 +32,17 @@ This is by far the easiest way to generate a transcript.
of the ``cmd2.Cmd`` class ensure that output is properly redirected when redirecting to a file, piping to a shell
command, and when generating a transcript.
+Automatically from a script file
+--------------------------------
+A transcript can also be automatically generated from a script file using ``load -t``::
+
+ (Cmd) load scripts/script.txt -t transcript.txt
+ 2 commands and their outputs saved to transcript file 'transcript.txt'
+ (Cmd)
+
+This is a particularly attractive option for automatically regenerating transcripts for regression testing as your ``cmd2``
+application changes.
+
Manually
--------
Here's a transcript created from ``python examples/example.py``::