I better to keep that somewhere since i always forget that thing, to do a search and replace from the command line in zsh. you just have to do the :s^FOO^BAR after your expansion

For example you just have typed the long command line :

blah bar FOO=1 FOO=3 FOO=6 cnt=1

you can just type :

!blah:s^FOO^VALUE^:G 

and it will be expanded to :

blah bar VALUE=1 VALUE=3 VALUE=6 cnt=1