shx icon indicating copy to clipboard operation
shx copied to clipboard

sed should be silent if '-i' is provided

Open nfischer opened this issue 6 years ago • 2 comments

$ sed -i 's/foo/bar/g' file.txt # note: this is silent
$ cat file.txt
bar
$ shx sed -i 's/bar/baz/g' file.txt # this should be silent
baz
$ shx cat file.txt
baz

We could arguably make the change in shelljs itself (which would help n_shell).

nfischer avatar Dec 07 '18 03:12 nfischer

This will be fixed in the next shelljs release. This is a breaking change in shelljs, so it might take a bit to get it released.

Keeping this open since we'll need to pull in a new shelljs version to get this fixed in shx.

nfischer avatar Jan 15 '22 21:01 nfischer

any ETA on when this will be fixed? Workaround: shx sed -i "s/original/replaced/g" myfile.txt > hidden.txt && shx rm -f hidden.txt

wondering639 avatar May 10 '24 21:05 wondering639