Pageup and Pagedown not searching through history in shell anymore

Mar 23rd, 2012 | By | Category: Linux / Freebsd

As of 2 days ago I was no longer able to search through my command history in shell with the pgup and pgdown keys, it just produced a bloody tilde in it’s place.  I think it started when I upgraded my kernel to 3.2.0-0.bpo.2 to be honest.  Anyways a major pain in the ass as searching through previous commands based on what you’ve typed is insanely helpful.

I checked my /etc/inputrc file and it was all the same, nothing changed.  I was still using the alternate mappings for my keys:

 # alternate mappings for “page up” and “page down” to search the history
“\e[5~”: history-search-backward
“\e[6~”: history-search-forward

everything else was good to go and inchanged.  I checked on my ~/.inputrc file and it was still the same, it contained one line:

set bell-style none

which was to prevent the stupid god damn system beep from happening all the time.  But then I got thinking, what if the presence of this in my home directory was causing debian to use it only and ignore /etc/inputrc so I logged in as root and guess what? Pgup/Pgdown started working again .  So I deleted my local ~/.inputrc file, made sure that /etc/inputrc had the bell-style none line in it(which it did already) and everything started working again.

Again I think this only started happening with the last upgrade so if you find yourself in this situation after upgrading your backport kernel/image/headers check if you have ~/.inputrc and either delete it or move those pgup/pgdown commands into it(as well as anything else you want) from /etc/inputrc

 

 

 

Tags: , , , , , , , , ,

One Comment to “Pageup and Pagedown not searching through history in shell anymore”

  1. Hi, thanks for this article. I was searching for the problems for weeks already… The problem occurs also if the .inputrc file simply exists, without any activated content. Removal seems to be the only solution. Best regards, Dirk

Leave a Comment