Searching forward through bash history

bash

You can hit ctrl-r from the command line to initiate a search for a previously issued command. You can then hit ctrl-r to cycle back through the older commands that match the search string.

However, there doesn't seem to be a way to cycle forward through the commands after you've cycled backwards. ctrl-s is supposed to do this but it doesn't work for me. I've search google but have come up empty on finding an alternative.

Best Answer

I think you may like Rob's Terminal History Management. You get matches, then the up and down arrow keys let you browse. Almost forgot, the file you want to edit is now ".bash_profile". Open your home folder and press ⇧⌘. to see it.