diff options
Diffstat (limited to 'docs/transcript.rst')
-rw-r--r-- | docs/transcript.rst | 17 |
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``:: |