sed should be silent if '-i' is provided
Open
Nobody has claimed this yet.
breaking
fix
sed
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 51
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
$ 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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how shx sed handles the -i option, then compare whether the behavior belongs in shx or shelljs, including the mentioned n_shell path. Reproduce the commands from the issue and verify that sed -i produces no extra output while still updating file.txt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100