> Repeat-By: > I have a following line in the my .inputrc file: > "\C-v": paste-from-clipboard > > After Bash has started the key is unbound: > $ bind -p | grep -i clip > # paste-from-clipboard (not bound) > > After "\C-x\C-r" keyboard sequence (re-read-init-file) > it is bind the key to the function but only till next <RETURN> will > typed. After any command or empty > <RETURN> it is come to be unbound. > > > Fix: >
This is expected behavior, and has been discussed on this list before. By default, terminals use Ctrl-V as the quoting character (see 'stty -a' and 'stty --help'). Readline 5.1 (and thus bash 3.1) added a new feature, bind-tty-special-characters, defaulted to on, which overrides key bindings in ~/.inputrc with those specified by the terminal. The solution, then, is to either turn this readline feature off (add "set bind-tty-special-characters off" to ~/.inputrc), or to tell your terminal to not bind Ctrl-V (add "stty lnext undef" to your ~/.bash_profile). If you like emacs bindings, where Ctrl-Q is the quoting character instead of Ctrl-V, you could do "stty lnext ^Q stop undef" instead. -- Eric Blake _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash