more ~/.bash_history | grep $1
Save it as /usr/bin/remember or some other name that's easy to keep track of (and in your PATH). Make it executable in the Terminal by typing:
chmod +x /usr/bin/remember
Now you can remember an old command by typing:
remember command-fragment-here
This may or may not be useful for you, but I use it from time to time.
[robg adds: I would strongly not recommend saving the script to /usr/bin. Instead, create a local bin directory in your user's home folder, or place it in /usr/local/bin. Both of these are preferable to adding your own code to the system's bin directory. As an alternative, I believe you could just create this as an alias, thereby not even requiring the shell script...]

