Look, I'm lazy, okay? - Lemmy.world

history | grep ‘command’

I use this all the time. Even better if you add it as a function.

I got that as hgrep
Mine is hists for ‘history search’. Interesting how we came up with different names for the same thing.