I'm using a bash shell. Normally if I want to repeat the last command that begins with a certain string, I can run
$ !cat
What if I want to run the last command that contains a string? That is, if I typed a command
$ cat dave.txt
and I want to run the last command with "dave" taht happened to be the above, is there a shortcut that will allow this?
Ctrl+R
enough? That won't let you run it directly but it makes it very easy to find. – terdon Dec 15 '20 at 17:45