-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readline.set_completer_delims
has no effect with libedit
#112105
Labels
type-bug
An unexpected behavior, bug, or error
Comments
corona10
pushed a commit
that referenced
this issue
Nov 28, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 28, 2023
(cherry picked from commit 2df26d8) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 28, 2023
(cherry picked from commit 2df26d8) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
corona10
pushed a commit
that referenced
this issue
Nov 28, 2023
corona10
pushed a commit
that referenced
this issue
Nov 28, 2023
Fixed. |
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
readline.set_completer_delims
works fine with GNU readline, but not with libedit.A quick example:
With GNU readline, it completes correctly, but with libedit, it can't - libedit still considers
$
as a delimiter. You can confirm that by printing the text incompleter
function.The issue is in
readline.c
:cpython/Modules/readline.c
Lines 576 to 581 in d4f83e1
readline.c
writes torl_completer_word_break_characters
, which works fine source.However, libedit does not do the same thing, it uses
rl_basic_word_break_characters
instead:Thus, writing to
rl_completer_word_break_characters
will not have any effect on libedit. The simplest way I can think of, is to write to bothrl_completer_word_break_characters
andrl_basic_word_break_characters
. They both exist in GNU readline and libedit, for slightly different purposes.rl_completer_word_break_characters
is the one that takes effectrl_basic_word_break_characters
just keeps a string as default value forrl_completer_word_break_characters
rl_completer_word_break_characters
is not used at allrl_basic_word_break_characters
is used for break wordsFrom what I can observe, writing to both variables has no unexpected side effect, because
rl_basic_word_break_characters
is not used on CPython with GNU readline.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, macOS
Linked PRs
The text was updated successfully, but these errors were encountered: