Given a history of commands:
1 pwd
2 mysql -u root -p
3 ps -ef | more
4 top
5 mysql -h 192.168.1.101 -u root -p
When you press the Up arrow, you scroll through all those commands. I've read it somewhere before (and done it in my work PC) that you can set-up BASH such that when I first type p then press the Up arrow, it would only scroll through all commands in history that starts with "p" (pwd and ps -ef | more). When I type mysql then press Up, then it would only scroll through all commands starting with "mysql".
I'd like to set my laptop to use this, but I can't find the instructions again.