14
2
I'm trying to do the right thing and put my key bindings into ~/.inputrc
.
However, it turns out that I have to change
bind '"\e\C-j":"\e[1~quiet \e[4~\n"'
into
"\e\C-j": "\eOHquiet \eOF\n"
Now \eOH
(nav-block-pos1 bound to beginning-of-line
) and \eOF
(nav-block-end bound to end-of-line
) are themselves bindings in my configuration which I possibly cannot always rely on.
So the main question is why does binding to num-block-pos1 (\e[1~
) and num-block-end (\e[4~
) work with bind
but not in my ~/.inputrc
?
Edit:
The whole thing is getting even more complicated, now that I realized that \e\C-j
only works for Gnome Terminial (or probably xterm as well, who knows...).
For my TTY it has to be
"\e\C-m": "\e[1~_quiet \e[4~\n"
So is it that various VTs have different implementations of how to interpret keys or what?
This is documented in the GNU Readline User Interface manual, section 1.3.
The
keymap
option is used to set what kind of key representation is used in key bindings definitions.Relevant information: http://superuser.com/questions/286781/readline-difference-between-vi-vi-move-vi-command-vi-insert-keymaps http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html#SEC9 https://wiki.archlinux.org/index.php/Readline
@ЯрославРахматуллин How exactly is this relevant to the difference in behavior between using
bind
and usinginputrc
for the actual binding. Should they not use the same settings? – None – 2012-12-05T06:15:32.193