If you do the following in Bash--maybe in other shells as well--you execute a command from your history that matches the provided keyword:
$ !keyword
I am looking for documentation for this command. I've tried searching through man bash page but no luck. I also tried Google but it's almost impossible (right?) to search for punctuation in Google.
I want to know:
What order does this command search your history? Oldest command to most recent? Or other way around?
I am aware of adding the :p option at the end of the command to prevent execution but is there other options? Although not sure what other options I'd want but just curious.
Of course I could figure this out by trial and error but I rather look trough the documentation before I use this neat command.
Perhaps I am looking in the wrong place? Any help in tracking down the documentation would be greatly appreciated.