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.
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.
added to 5.0-r2, thanks !