summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorZvezdan Petkovic <zpetkovic@acm.org>2018-05-17 06:45:10 (GMT)
committerNed Deily <nad@python.org>2018-05-17 06:45:10 (GMT)
commitc2f082e9d164acfa8f96de9526f0f47ae92c426a (patch)
tree2703db1255f12f5603b1f0b38c9f888305bc72f2 /Doc/library
parent64fddc423fcbe90b8088446c63385ec0aaf3077c (diff)
downloadcpython-c2f082e9d164acfa8f96de9526f0f47ae92c426a.zip
cpython-c2f082e9d164acfa8f96de9526f0f47ae92c426a.tar.gz
cpython-c2f082e9d164acfa8f96de9526f0f47ae92c426a.tar.bz2
bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915)
The editline emulation needs to be initialized *after* the name is defined. This fixes the long open issue.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/readline.rst22
1 files changed, 15 insertions, 7 deletions
diff --git a/Doc/library/readline.rst b/Doc/library/readline.rst
index 837816e..16c28cf 100644
--- a/Doc/library/readline.rst
+++ b/Doc/library/readline.rst
@@ -17,11 +17,18 @@ made using this module affect the behaviour of both the interpreter's
interactive prompt and the prompts offered by the built-in :func:`input`
function.
+Readline keybindings may be configured via an initialization file, typically
+``.inputrc`` in your home directory. See `Readline Init File
+<https://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_
+in the GNU Readline manual for information about the format and
+allowable constructs of that file, and the capabilities of the
+Readline library in general.
+
.. note::
The underlying Readline library API may be implemented by
the ``libedit`` library instead of GNU readline.
- On MacOS X the :mod:`readline` module detects which library is being used
+ On macOS the :mod:`readline` module detects which library is being used
at run time.
The configuration file for ``libedit`` is different from that
@@ -29,12 +36,13 @@ function.
you can check for the text "libedit" in :const:`readline.__doc__`
to differentiate between GNU readline and libedit.
-Readline keybindings may be configured via an initialization file, typically
-``.inputrc`` in your home directory. See `Readline Init File
-<https://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_
-in the GNU Readline manual for information about the format and
-allowable constructs of that file, and the capabilities of the
-Readline library in general.
+ If you use *editline*/``libedit`` readline emulation on macOS, the
+ initialization file located in your home directory is named
+ ``.editrc``. For example, the following content in ``~/.editrc`` will
+ turn ON *vi* keybindings and TAB completion::
+
+ python:bind -v
+ python:bind ^I rl_complete
Init file