• tl;dr: fdfind . | sad "locale" "localBLAH" --pager 'delta -s' <– use tab to toggle select, Y to execute, q to quit without doing anything, affected files are printed to stdout

Details:

Original Checkvist

Discovered: May 22, 2022 18:48 Today in Command line Fun for Some Values of Fun™, combine fzf and sad to switch out your venerable but somewhat perilous sed or perl one-liner that recursively finds & replaces texts in files with a thing with a diff viewer that lets you preview what’s going to happen. <– tl;dr: fd "blah*.rb" | sad "old text" "new text" --pager s –> QUOTE from followup tweet: Side note to @ftrain: yes, OBVIOUSLY one should just do this in Emacs with vertico and C-c s p foo C-; E C-c C-p :%s/foo/bar/g RET Z Z –> fdfind on ubuntu –> fdfind . | sad "locale" "localBLAH" --pager 'delta -s' <– use tab to toggle select, Y to execute, affected files are printed to stdout

Leave a comment on github