summaryrefslogtreecommitdiffstats
path: root/Doc/library/readline.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-05-15 01:26:25 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-05-15 01:26:25 (GMT)
commitf0dbf7a6abc821c77e912deae81e3a27cf334c54 (patch)
treebf28e30216f084dc637caa140960a9b14e7aef60 /Doc/library/readline.rst
parent4dd27f0adcee901bff19c536d8442d666440a415 (diff)
downloadcpython-f0dbf7a6abc821c77e912deae81e3a27cf334c54.zip
cpython-f0dbf7a6abc821c77e912deae81e3a27cf334c54.tar.gz
cpython-f0dbf7a6abc821c77e912deae81e3a27cf334c54.tar.bz2
Issue #26870: Add readline.set_auto_history(), originally by Tyler Crompton
Diffstat (limited to 'Doc/library/readline.rst')
-rw-r--r--Doc/library/readline.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/readline.rst b/Doc/library/readline.rst
index 42e0ad5..f777920 100644
--- a/Doc/library/readline.rst
+++ b/Doc/library/readline.rst
@@ -156,6 +156,20 @@ The following functions operate on a global history list:
This calls :c:func:`add_history` in the underlying library.
+.. function:: set_auto_history(enabled)
+
+ Enable or disable automatic calls to :c:func:`add_history` when reading
+ input via readline. The *enabled* argument should be a Boolean value
+ that when true, enables auto history, and that when False, disables
+ auto history.
+
+ .. versionadded:: 3.6
+
+ .. impl-detail::
+ Auto history is enabled by default, and changes to this do not persist
+ across multiple sessions.
+
+
Startup hooks
-------------