bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: readline crash with custom .inputrc


From: Koichi Murase
Subject: Re: readline crash with custom .inputrc
Date: Tue, 26 Jan 2021 21:48:31 +0800

2021年1月26日(火) 20:34 Matthias Klose <doko@debian.org>:
> This was reported for Debian in https://bugs.debian.org/968703 for the
> interactive Python interpreter,
> [...]
> just hitting return in interactive mode triggers the segfault.

Reduced-Case:

$ cat .inputrc
"\ra": self-insert
$ python3
Python 3.7.7 (default, Mar 13 2020, 21:39:43)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>        /*** <---- Here, hit RET (\C-m) twice ***/
Segmentation fault (core dumped)

----------

By the way, the key sequence format used in your .inputrc is incorrect.

> "\C-M-f": forward-word
> "\C-M-b": backward-word

Those lines are interpreted as [\C-m (RET)] + ["-" key] + ["f"/"b"
key]. They must be

"\C-\M-f": forward-word
"\C-\M-b": backward-word

> "\<S-delete>": kill-line
> "\<S-delete>": kill-region
> "\<S-insertchar>": yank

Those lines won't be interpreted as you expect. There is no such a way
to specify the key by the string "<key name>". You need directly
specify the corresponding escape sequence that your terminal sends.

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]