summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/cmd.rst10
-rw-r--r--docs/api/history.rst16
-rw-r--r--docs/api/index.rst1
3 files changed, 26 insertions, 1 deletions
diff --git a/docs/api/cmd.rst b/docs/api/cmd.rst
index 213a14ec..345e6219 100644
--- a/docs/api/cmd.rst
+++ b/docs/api/cmd.rst
@@ -29,8 +29,16 @@ cmd2.Cmd
.. attribute:: settable
- This dictionary contains the name and description of all settings available to users.
+ 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`.
diff --git a/docs/api/history.rst b/docs/api/history.rst
new file mode 100644
index 00000000..a685db7a
--- /dev/null
+++ b/docs/api/history.rst
@@ -0,0 +1,16 @@
+cmd2.history
+===============
+
+.. autoclass:: cmd2.history.History
+ :members:
+
+.. autoclass:: cmd2.history.HistoryItem
+ :members:
+
+ .. attribute:: statement
+
+ The statement object resulting from parsing
+
+ .. attribute:: idx
+
+ The 1-based index of this statement in the history list
diff --git a/docs/api/index.rst b/docs/api/index.rst
index fea39f72..43b36c7a 100644
--- a/docs/api/index.rst
+++ b/docs/api/index.rst
@@ -7,6 +7,7 @@ API Reference
cmd
parsing
decorators
+ history
ansi
utils
constants