Open backspaces opened 5 years ago
Yeah, I can repro. Seems like a bug in grep()
rather than ls()
.
shx ls | shx grep -v 'foo' # bug
shx ls | grep -v 'foo' # no bug
ls | shx grep -v 'foo' # bug
ls | grep -v 'foo' # no bug
PRs are welcome for https://github.com/shelljs/shelljs (it seems the bug is there, rather than in this project).
Certain uses of grep appear to add extra newlines.
Ex: Try something like this:
It acts as expected, producing strings with a single \n for each line.
But
appears to add a second newline at the end of the set of strings.
This can be explicitly seen in node: