diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-05-15 01:26:25 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-05-15 01:26:25 (GMT) |
commit | f0dbf7a6abc821c77e912deae81e3a27cf334c54 (patch) | |
tree | bf28e30216f084dc637caa140960a9b14e7aef60 /Doc | |
parent | 4dd27f0adcee901bff19c536d8442d666440a415 (diff) | |
download | cpython-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')
-rw-r--r-- | Doc/library/readline.rst | 14 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 8 |
2 files changed, 22 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 ------------- diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 384e35a..bad0f9e 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -239,6 +239,14 @@ Protocol version 4 already supports this case. (Contributed by Serhiy Storchaka in :issue:`24164`.) +readline +-------- + +Added :func:`~readline.set_auto_history` to enable or disable +automatic addition of input to the history list. (Contributed by +Tyler Crompton in :issue:`26870`.) + + rlcompleter ----------- |