Yes and there is also Ctrl+R which kicks off a recursive search which is what I use most of the time but what about the complex 2 liner with pipes and dates 19 commands ago? :)
EDIT: Oh. Duh. Brain freeze. Well, I’ll leave this here anyway.
Won’t this work:
$ history | grep SOME_UNIQUE_PART_OF_YOUR_TWO_LINER
And then
$ !HISTORYID
? I do this almost daily and with my bash history set to 10000 lines I pretty much find everything.
Try fzf. It lets searching recursively and out of order through history, file system, and can be inserted anywhere in a pipe.