Quick note, if you are using the command edit/replace feature and are using a conditional command construct (echo "first command" && echo "second command!") the ^foo^bar syntax only replaces the first instance of the searched text.
To replace every instance of that searched text, you have to use !!:gs/foo/bar; going back to my first example:
Great write-up!
Quick note, if you are using the command edit/replace feature and are using a conditional command construct (
echo "first command" && echo "second command!") the^foo^barsyntax only replaces the first instance of the searched text.To replace every instance of that searched text, you have to use
!!:gs/foo/bar; going back to my first example:To replace all the instances of
commandin...echo "first command" && echo "second command!"...you have to execute...
!!:gs/command/echo...to output:
Further reading: Stack exchange
Yup I found out about it sometime after I wrote the original post almost 10 years ago. Thanks for the reminder!