Home > bash, linux, mac os > Configure prefix-based bash history search in inputrc

Configure prefix-based bash history search in inputrc

I always add these two lines to ${HOME}/.inputrc (just for me) or /etc/inputrc (all users) to enable prefix-based bash history search using the Page-Up and Page-Down keys:


"\e[5~": history-search-backward
"\e[6~": history-search-forward

After editing the inputrc you have log out and in again for the changes to take effect.

Advertisements
Categories: bash, linux, mac os
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: