Just a question to improve my bash skills. I always do this:
bash
$ history | grep some_long_command ... ... 123 some_long_command1......... 124 some_l
!123:gs/old/new/
Will run command 123 replacing the string 'old' with the string 'new'.