bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] Confused about the behaviour of bind-tty-special-chars


From: Richard Michael
Subject: [Bug-readline] Confused about the behaviour of bind-tty-special-chars
Date: Sat, 3 Sep 2011 17:15:48 +0200

Hello everyone,

MacOS 10.6, macports provided bash 4.2.10(2) compiled against macports
readline-6.20.


I've turned off special char binding:

$ cat ~/.inputrc
set bind-tty-special-chars off

$  bind -v | grep special-chars
set bind-tty-special-chars off


However, readline still binds functions for \C-u, \C-w and other tty
keyseqs (such as HOME, END).

$ bind -p | grep '\C-[uw]'
"\C-u": unix-line-discard
"\C-w": unix-word-rubout

$ bind -q beginning-of-line
beginning-of-line can be invoked via "\eOH", "\e[H".


Why?  After turning off the special char binding, I expected to see
these keyseqs as self-inserting and the functions as unbound.


If I undefine those sequences on the terminal, readline still binds
these functions.

$ stty gfmt1:werase=ff:kill=ff
$ stty -a

(... snipped output ...)

kill = <undef>;
werase = <undef>;


$ exec bash

$ bind -p | grep '\C-[uw]'
"\C-u": unix-line-discard
"\C-w": unix-word-rubout


I *can* rebind these keyseqs to the readline functions I prefer, but
I'm trying to understand how this works.  Moreover, I'd like to remove
the HOME, END and other bindings which I don't use.

(Aside, "bind -u .. ", ex. "bind -u beginning-of-line", does not
unbind these functions.  Is that related?)


I doubt this is a bug, and probably only my misunderstanding.  Any
comments are appreciated.


Regards,
Richard



reply via email to

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