zsh has a simple builtin `r` (which is just an alias for `fc -e -`). It lets you edit the previous command with search and replace. I use it for brew and git a lot.
$ brew info rust
$ r fo=stal $ brew info rust
$ r fo=stalNo comments yet.