On Sat, Sep 3, 2011 at 8:59 PM, Chet Ramey <[email protected]> wrote: > On 9/3/11 11:15 AM, Richard Michael wrote: >> 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. > > Those are the default readline key bindings. The defaults exist > regardless of whether or not readline takes the extra step to make > sure the tty special chars are bound to their readline equivalents. > The bind-tty-special-chars variable caters mostly to those who bind > their tty special characters to values other than the defaults.
Thank you very much for quick reply and clear explanation. Is there a list of these defaults (or, which source file contains them)? I offer to contribute them to the manual. (Did I miss it?) > However, readline binds functions to the arrow and keypad keys on each > invocation. There's not currently any way to turn that off. > `bind -u beginning-of-line' will remove the default binding to ^A, but > leave the arrow key bindings intact. Yes, sorry, I could have mentioned that I did notice "bind -u .. " would remove a binding I configured myself, but that it always retained the PGUP, HOME, etc. bindings. How it was determining the PGUP, HOME, etc. keyseqs was the next thing I was going to investigate. Regarding default bindings, the manual indicates many "defaults", ex. \C-a beginning-of-line. These do not work out-of-the-box on my readline, I've had to add them to an inputrc. How should I understand "default" in the documentation: "configured by the inputrc which ships with the readline library and may therefore be broken by a vendor on your system", or, "hard coded in readline" (such as above, \C-u unix-line-discard and \e[H beginning-of-line, etc.)? Regards, Richard _______________________________________________ Bug-readline mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-readline
