Friday, January 8, 2016

Linux(Centos/Ubuntu). Bash history search like in FreeBSD(tcsh)

echo '"\e[A": history-search-backward' >> /etc/inputrc
echo '"\e[B": history-search-forward' >> /etc/inputrc

bind -f /etc/inputrc


You'll find it wonderful! Definitely! It makes search in your bash history really simple. When you type just few first symbols of previously entered command and press arrow keys to get it back and thus avoiding typing of the whole line again and again every time.

Much more fancier than ctrl+r.

No comments:

Post a Comment