I have this ~/.inputrc file that I created for certain key bindings.
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C":forward-word
"\e[1;5D":backward-word
"\e[5C":forward-word
"\e[5D":backward-word
"\e\e[C":forward-word
"\e\e[D":backward-word
whenever I try to run source ~/.inputrc
, it gives me the following error:
\e[1;5C:forward-word: Command not found. \e[1;5D:backward-word: Command not found. \e[5C:forward-word: Command not found. \e[5D:backward-word: Command not found. \e\e[C:forward-word: Command not found. \e\e[D:backward-word: Command not found.
It also doesn't work when I open a new terminal, I don't get the error but my ctrl key combinations are not working in new terminal as well. I created this file myself since I do not have root access to change /etc/inputrc. Can anybody help me out? Thanks.
EDIT: I've tried the file with space after the colon (:) sign as well. It doesn't work. I also tried my making it executable (chmod +x ~/.inputrc), didn't work.
EDIT: I realized that this procedure is only for 'bash' and I am running 'tcsh'. For 'csh', use .bindings
file instead of .inputrc
file and use bindkey
syntax.
bind
command from? – danijar May 23 '18 at 10:57$include /etc/inputrc
? – mwfearnley Jan 19 '19 at 13:39