After a recent update of my Arch Linux, I faced an issue in bash. Ctrl+Left/Right didn’t work. Instead, bash just showed “;5D;5C;5A;5B;5D;5C”, etc.
Hopefully, I use git to keep track of my /etc directory, thus I was able to see the diff of the update. The cause of the issue is a change in /etc/profile, specifically, removing the line:
As we may see from man bash, “If that variable [INPUTRC] is unset, the default is ~/.inputrc.” Yes, I didn’t set the variable in my .bashrc, and I didn’t have the .inputrc file. So, the solution is pretty obvious: create your own .inputrc file. Mine is below:
1 2 3 4 5 6 7
Ctrl+Left/Right works great now! For more information on how to configure bash, go to https://wiki.archlinux.org/index.php/Bash.