I have searched, but not found anything on this. I am looking for a functionality in bash, using a terminal.
Way back when, I had a user on a debian system, and a friend set me up with a convenient history search feature (I believe I used tcsh then), where I would type the beginning of a previous command, hit up-arrow, and it would do a search, based on the partial string.
E.g. if my history is:
./script.pl
./script.pl arg1
cat output
cat output | grep yada
And I type .
, and press up-arrow, it would show me: ./script.pl arg1
. Press it again and it would show ./script.pl
, etc.
Very much like it would perform a grep
on .bash_history. Is there a way to get this functionality?