blob: 34c0dcf73d99c2bd20b4930d965ea5f92e3a67cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
cmd2.Cmd
========
.. autoclass:: cmd2.Cmd
:members:
.. automethod:: __init__
.. attribute:: continuation_prompt
Use as prompt for multiline commands on the 2nd+ line of input.
Default: ``>``.
.. attribute:: default_error
The error message displayed when a non-existent command is run.
Default: ``{} is not a recognized command, alias, or macro``
.. attribute:: help_error
The error message displayed to the user when they request help for a
command with no help defined.
Default: ``No help on {}``
.. attribute:: prompt
The prompt issued to solicit input.
Default: ``(Cmd)``.
.. attribute:: settable
This dictionary contains the name and description of all settings
available to users.
Users use the :ref:`features/builtin_commands:set` command to view and
modify settings. Settings are stored in instance attributes with the
same name as the setting.
.. attribute:: history
A record of previously entered commands.
This attribute is an instance of :class:`cmd2.history.History`, and
each command is an instance of :class:`cmd2.history.HistoryItem`.
.. attribute:: statement_parser
An instance of :class:`cmd2.parsing.StatementParser` initialized and
configured appropriately for parsing user input.
|