@@ -15,8 +15,14 @@ get a `!` shortcut for `shell`, which allows you to type:
1515
1616 (Cmd) !ls -al
1717
18- NOTE: ` cmd2 ` provides user-friendly tab completion throughout the process of running a shell
19- command - first for the shell command name itself, and then for file paths in the argument section.
18+ !!! note
19+
20+ `cmd2` provides user-friendly tab completion throughout the process of running a shell command -
21+ first for the shell command name itself, and then for file paths in the argument section.
22+
23+ However, a `cmd2` application effectively **becomes** the shell, so if you have _extra_ shell
24+ completion configured for your particular shell such as `bash`, `zsh`, `fish`, etc. then this
25+ will not be available within `cmd2`.
2026
2127## Editors
2228
@@ -36,16 +42,18 @@ system.
3642
3743## Terminal pagers
3844
39- Output of any command can be displayed one page at a time using the ` cmd2.Cmd.ppaged ` method.
45+ Output of any command can be displayed one page at a time using the [ cmd2.Cmd.ppaged] [ ] method.
4046
4147Alternatively, a terminal pager can be invoked directly using the ability to run shell commands with
4248the ` ! ` shortcut like so:
4349
4450 (Cmd) !less foo.txt
4551
46- NOTE: Once you are in a terminal pager, that program temporarily has control of your terminal,
47- ** NOT** ` cmd2 ` . Typically you can use either the arrow keys or ` <PageUp> ` /` <PageDown> ` keys to
48- scroll around or type ` q ` to quit the pager and return control to your ` cmd2 ` application.
52+ !!! warning
53+
54+ Once you are in a terminal pager, that program temporarily has control of your terminal,
55+ **NOT** `cmd2`. Typically you can use either the arrow keys or `<PageUp>`/`<PageDown>` keys to
56+ scroll around or type `q` to quit the pager and return control to your `cmd2` application.
4957
5058## Exit codes
5159
@@ -87,10 +95,10 @@ shell, and execute those commands before entering the command loop:
8795
8896 $ python examples/transcript_example.py help
8997
90- Documented commands (use 'help -v' for verbose/'help <topic>' for details):
91- ===========================================================================
92- alias help macro orate quit run_script set shortcuts
93- edit history mumble py run_pyscript say shell speak
98+ Documented Commands
99+ ───────────────────
100+ alias help macro orate run_pyscript say shell speak
101+ edit history mumble quit run_script set shortcuts
94102
95103 (Cmd)
96104
@@ -111,8 +119,9 @@ shell, but have it say it in pig latin:
111119Uh-oh, that's not what we wanted. ` cmd2 ` treated ` -p ` , ` hello ` , and ` there ` as commands, which don't
112120exist in that program, thus the syntax errors.
113121
114- There is an easy way around this, which is demonstrated in ` examples/cmd_as_argument.py ` . By setting
115- ` allow_cli_args=False ` you can do your own argument parsing of the command line:
122+ There is an easy way around this, which is demonstrated in
123+ [ cmd_as_argument.py] ( https://github.com/python-cmd2/cmd2/blob/main/examples/cmd_as_argument.py )
124+ example. By setting ` allow_cli_args=False ` you can do your own argument parsing of the command line:
116125
117126 $ python examples/cmd_as_argument.py speak -p hello there
118127 ellohay heretay
0 commit comments