KISS

Keep It Simple Stupid

Bash: how to fix ";5D" issue

| comments

Hi again.

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:

INPUTRC="/etc/inputrc"

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
$include /etc/inputrc

# faster completion
set show-all-if-ambiguous on

"\e[A": history-search-backward
"\e[B": history-search-forward

Ctrl+Left/Right works great now! For more information on how to configure bash, go to https://wiki.archlinux.org/index.php/Bash.

bash, linux

Don't hesitate to leave a comment below. NB! If you don't see a comment form under the post, it's most likely that an extension (such as Ghostery, NoScript, or AdBlock) of your browser blocks the scripts from disqus.com, and you can unblock that.

« Podcasts! Sandisk Sansa Clip+ + podcasts + gPodder »

Comments