Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74807 - readline doesn't pick up the delete-key binding from terminfo
Summary: readline doesn't pick up the delete-key binding from terminfo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-17 20:51 UTC by Ivan Todoroski
Modified: 2005-02-11 21:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Automatically bind the delete key from terminfo (rl-del-backspace-policy.patch,1.35 KB, patch)
2004-12-17 21:06 UTC, Ivan Todoroski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Todoroski 2004-12-17 20:51:45 UTC
If you don't bind them specifically in /etc/inputrc, readline picks up a few special key bindings from the terminfo definition for the current terminal.

It will set up the arrow keys, home/end, and a few more, so you have a more or less working key configuration in any terminal, even if you haven't configured inputrc.

The problem is that, strangely enough, it doesn't automatically pick up the Del key, which is quite annoying. In order to have a working delete key, you have to litter /etc/inputrc with crap like:

$if term=bleah
"foo": delete-char
$endif
$if term=blurgh
"bar": delete-char
$endif

and so on, and so on... the whole freaking point of terminfo (and termcap before it) is to keep this terminal specific config in one place, the terminfo database, so that you don't have to fiddle with separate configurations for every program/library/whatever. Why readline does this backward thing is beyond me.

I mean, it already automatically picks up the other special keys, so how much more effort could it be to pick up the Delete key also? I would say the Delete key is just as important as the others for line editing.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Ivan Todoroski 2004-12-17 21:06:47 UTC
Created attachment 46254 [details, diff]
Automatically bind the delete key from terminfo

I remembered that on Debian readline used to work correctly, I didn't have to
tinker with /etc/inputrc to get the delete key to work on various terminals. So
I took a look inside their readline package and bingo! They have this little
patch which adds the Delete key to the list of automatic bindings.

I tried it and now readline works just fine.

It's a very simple and non-intrusive patch, please incorprate it in the
readline ebuild.
Comment 2 SpanKY gentoo-dev 2005-02-11 21:25:17 UTC
added to 5.0-r2, thanks !