Same with fish. It actually shows anything if you just put in one part of the command, so you don’t need to specify the exact starting command (in case you might not remember).
Example (which I use regularly):
install, then up (and up and up, and so on), and I see everything I’ve ever used that has install somewhere in it.
So I’ll get results ranging from sudo apt install foo to sudo nala install foo to flatpak install foo.