diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-20 20:01:24 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-20 20:01:24 -0500 |
commit | 6bc3c7528b02f0160c31eb008f1218ee4c3344bc (patch) | |
tree | 48f369edfa4225e38afc5eca5695c14646e54979 /examples/transcripts | |
parent | bd948d727e0e13fa5fd77199c06fcd3dfdda9b39 (diff) | |
download | cmd2-git-6bc3c7528b02f0160c31eb008f1218ee4c3344bc.tar.gz |
History enhancements
History changes:
- Unknown commands are no longer saved in the history
- history command now has a -t option to generate a transcript based on commands in the history
Also:
- Moved examples transcripts from examples to examples/transcripts
- Added a new transcript for use with the pirate.py example
Diffstat (limited to 'examples/transcripts')
-rw-r--r-- | examples/transcripts/exampleSession.txt | 17 | ||||
-rw-r--r-- | examples/transcripts/pirate.transcript | 10 | ||||
-rw-r--r-- | examples/transcripts/transcript_regex.txt | 17 |
3 files changed, 44 insertions, 0 deletions
diff --git a/examples/transcripts/exampleSession.txt b/examples/transcripts/exampleSession.txt new file mode 100644 index 00000000..840bee60 --- /dev/null +++ b/examples/transcripts/exampleSession.txt @@ -0,0 +1,17 @@ +# Run this transcript with "python argparse_example.py -t exampleSession.txt" +# The regex for colors is because no color on Windows. +# The regex for editor will match whatever program you use. +# regexes on prompts just make the trailing space obvious +(Cmd) set +abbrev: False +colors: /(True|False)/ +continuation_prompt: >/ / +debug: False +echo: False +editor: /.*?/ +feedback_to_output: False +locals_in_py: True +maxrepeats: 3 +prompt: (Cmd)/ / +quiet: False +timing: False diff --git a/examples/transcripts/pirate.transcript b/examples/transcripts/pirate.transcript new file mode 100644 index 00000000..570f0cd7 --- /dev/null +++ b/examples/transcripts/pirate.transcript @@ -0,0 +1,10 @@ +arrr> loot +Now we gots 1 doubloons +arrr> loot +Now we gots 2 doubloons +arrr> loot +Now we gots 3 doubloons +arrr> drink 3 +Now we gots 0 doubloons +arrr> yo --ho 3 rum +yo ho ho ho and a bottle of rum diff --git a/examples/transcripts/transcript_regex.txt b/examples/transcripts/transcript_regex.txt new file mode 100644 index 00000000..7d017dee --- /dev/null +++ b/examples/transcripts/transcript_regex.txt @@ -0,0 +1,17 @@ +# Run this transcript with "python example.py -t transcript_regex.txt" +# The regex for colors is because no color on Windows. +# The regex for editor will match whatever program you use. +# regexes on prompts just make the trailing space obvious +(Cmd) set +abbrev: True +colors: /(True|False)/ +continuation_prompt: >/ / +debug: False +echo: False +editor: /.*?/ +feedback_to_output: False +locals_in_py: True +maxrepeats: 3 +prompt: (Cmd)/ / +quiet: False +timing: False |