3 ms·
A complementary tip for Ctr+R is to tag long reusable commands with a comment in the end, e.g., find . -name "*.png" -print0 | xargs -0 -P8 pngquant --ext .png
by temo4ka 13y ago
A complementary tip for Ctr+R is to tag long reusable commands with a comment in the end, e.g.,
find . -name "*.png" -print0 | xargs -0 -P8 pngquant --ext .png --force 256 #optimizepng
(if you’re using zsh, you have to enable INTERACTIVE_COMMENTS option first; just run set -k)
- SkyMarshal 13y agoCool tip, did not know that, though I prefer to put long reusable commands in script files, in part so I can comment them to better remember what everything is doing.
- bstpierre 13y agoThanks! I didn't know about INTERACTIVE_COMMENTS. Adding a comment there is a neat trick. It also works with bang searches (!?), almost like creating a temporary ad-hoc alias: find . -name "*.png" -print0 | xargs -0 -P8 pngquant --ext .png --force 256 #optimizepng ... many other commands, time passes ... !?optimizepng