diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-11-11 12:03:38 -0500 |
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-11-11 12:03:38 -0500 |
| commit | dbc9f819182b26d0ae68f55e24467411d5711290 (patch) | |
| tree | beb1a79dc1a5f4863182f61c38859fa59619c933 /examples/exampleSession.txt | |
| parent | af06c06a5e580c92cf934f110c9e88ec75cde235 (diff) | |
| download | cmd2-git-dbc9f819182b26d0ae68f55e24467411d5711290.tar.gz | |
Made a couple fixes to existing examples
Changes include:
- argparse_example.py modified to do pass all unknown args onto cmd2 and allow arguments at invocation
- example.py comments modified to indicate it is intended to be used with transcript_regext.txt
- exampleSession.txt fixed so it works properly with argparse_example.py
Diffstat (limited to 'examples/exampleSession.txt')
| -rw-r--r-- | examples/exampleSession.txt | 88 |
1 files changed, 17 insertions, 71 deletions
diff --git a/examples/exampleSession.txt b/examples/exampleSession.txt index de7eea96..ef6df857 100644 --- a/examples/exampleSession.txt +++ b/examples/exampleSession.txt @@ -1,72 +1,18 @@ -# Run this transcript with "python example.py -t exampleSession.txt" -(Cmd) help - -Documented commands (type help <topic>): -======================================== -_relative_load edit history orate pyscript run say shell show -cmdenvironment help load py quit save set shortcuts speak - -(Cmd) help say -Repeats what you tell me to. -Usage: speak [options] arg - -Options: - -h, --help show this help message and exit - -p, --piglatin atinLay - -s, --shout N00B EMULATION MODE - -r REPEAT, --repeat=REPEAT - output [n] times - -(Cmd) say goodnight, Gracie -goodnight, Gracie -(Cmd) say -ps --repeat=5 goodnight, Gracie -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) set maxrepeats 5 -maxrepeats - was: 3 -now: 5 -(Cmd) say -ps --repeat=5 goodnight, Gracie -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) hi --------------------------[1] -help --------------------------[2] -help say --------------------------[3] -say goodnight, Gracie --------------------------[4] -say -ps --repeat=5 goodnight, Gracie --------------------------[5] -set maxrepeats 5 --------------------------[6] -say -ps --repeat=5 goodnight, Gracie -(Cmd) run 4 -say -ps --repeat=5 goodnight, Gracie - -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -OODNIGHT, GRACIEGAY -(Cmd) orate Four score and -> seven releases ago -> our BDFL -> blah blah blah -Four score and -seven releases ago -our BDFL -blah blah blah -(Cmd) & look, a shortcut! -look, a shortcut! -(Cmd) show color +# 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 +autorun_on_edit: False colors: /(True|False)/ -(Cmd) set prompt "---> " -prompt - was: (Cmd) -now: ---> ----> say goodbye -goodbye +continuation_prompt: >/ / +debug: False +echo: False +editor: /.*?/ +feedback_to_output: False +locals_in_py: True +maxrepeats: 3 +prompt: (Cmd)/ / +quiet: False +timing: False |
