[rescue] Mainframe on eBay

Michael Parson mparson at bl.org
Mon Oct 3 14:13:54 CDT 2005

On Mon, Oct 03, 2005 at 02:44:50PM -0400, der Mouse wrote:
>>> Not as far as bash is concerned; whenever I type a ^P to bash, I
>>> want it to be previous-history.  ^P as `suspend' I want only when I
>>> type it to something else.
>> readline is your problem.  That's what bash uses to interface with
>> ttys.
> Then readline needs fixing, or bash needs to stop using it.  Really,
> this is *not* rocket science; I managed to do it on 4.3BSD when hacking
> line editing into csh.  tcsh manages to do it today.  bash could do it
> too - if its maintainers cared to bother.

The readline libraries give whatever wants to use it what we would hope
to be useful keybindings, either in emacs-mode (default) or vi-mode, my
preffered method.  I use readline/bash even on my non-Linux systems,
I've grown used to the way it does things and rather like some of the

> If I were going to be using Linux enough to make it worth my while,
> I'd port over my shell (a rather mutant csh with, among other things,
> command-line editing that doesn't get upset over c_cc[VSUSP]=0x10).
> Of course, ranting about it here is of dubious value, since it's
> clearly not a case like the ls sort order where there is a fix and I
> just don't yet know about it.  (I don't suppose you know of any way to
> rebind ^X so that it's not a prefix key, by any chance?)

It looks like the ^X is from the emacs bindings, but you should be
able to override any of the defaults by editing either the system wide
/etc/inputrc, or your persional ~/.inputrc.

What are you wanting ^X to do for you?

Putting this in my ~/.inputrc :

"\C-x": "hello"

Makes the string "hello" appear on my command line when I hit ^X in a
new shell.  The readline(3) manpage gives more info. (at least) NetBSD
has a similar built-in library called editline(3).

Michael Parson
mparson at bl.org

More information about the rescue mailing list