Coming from a FreeBSD world I wish to make the Linux terminal behave like FreeBSD one, especially the 9.1 version, basically when you type cd
in the terminal and push the "up" arrow you can browse all the commands in the history starting with cd
which makes you gain a lot time.
I don't know how to enable this feature in Linux Debian or CentOS which force me to type the whole, could someone please help.
Best Answer
Add to the following to
~/.inputrc
:Explanation
~/.inputrc
is the configuration file for GNU readline. Many shells, includingbash
andtcsh
use readline for command line editing. The two lines above will tell readline to invoke its history search functionality when the escape sequences for the up-arrow key (\e[A
) and down-arrow key (\e[B
) are encountered.