diff options
author | Tian Gao <gaogaotiantian@hotmail.com> | 2023-12-01 14:05:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 14:05:55 (GMT) |
commit | c2982380f827e53057068eccf9f1a16b5a653728 (patch) | |
tree | e8f49c1ea683a6013322b1c915291f140cb4e404 /Lib/site.py | |
parent | f8ff80f63536e96b004d29112452a8f1738fde37 (diff) | |
download | cpython-c2982380f827e53057068eccf9f1a16b5a653728.zip cpython-c2982380f827e53057068eccf9f1a16b5a653728.tar.gz cpython-c2982380f827e53057068eccf9f1a16b5a653728.tar.bz2 |
gh-112510: Add `readline.backend` for the backend readline uses (GH-112511)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index 672fa7b..2517b7e 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -444,8 +444,7 @@ def enablerlcompleter(): # Reading the initialization (config) file may not be enough to set a # completion key, so we set one first and then read the file. - readline_doc = getattr(readline, '__doc__', '') - if readline_doc is not None and 'libedit' in readline_doc: + if readline.backend == 'editline': readline.parse_and_bind('bind ^I rl_complete') else: readline.parse_and_bind('tab: complete') |