314
|
1 ===================================
|
|
2 Features requiring no modifications
|
|
3 ===================================
|
|
4
|
|
5 These features are provided "for free" to a cmd_-based application
|
|
6 simply by replacing ``import cmd`` with ``import cmd2 as cmd``.
|
|
7
|
315
|
8 Script files
|
|
9 ============
|
|
10
|
|
11 Commands can be loaded from, run from, and saved to text files.
|
|
12
|
|
13 .. automethod:: cmd2.Cmd.do_load
|
|
14
|
|
15 Output redirection
|
|
16 ==================
|
|
17
|
|
18 Commands at start
|
|
19 =================
|
|
20
|
|
21 Python
|
|
22 ======
|
|
23
|
314
|
24 Searchable command history
|
|
25 ==========================
|
|
26
|
|
27 All cmd_-based applications have access to previous commands with
|
|
28 the up- and down- cursor keys.
|
|
29
|
|
30 All cmd_-based applications on systems with the ``readline`` module
|
|
31 also provide `bash-like history list editing`_.
|
|
32
|
|
33 .. _`bash-like history list editing`: http://www.talug.org/events/20030709/cmdline_history.html
|
|
34
|
|
35 ``cmd2`` makes a third type of history access available, consisting of these commands:
|
|
36
|
|
37 .. automethod:: cmd2.Cmd.do_history
|
|
38
|
315
|
39 Transcript-based testing
|
|
40 ========================
|