shelljs / shx

Portable Shell Commands for Node
MIT License
1.72k stars 44 forks source link

Commands should accept stdin #80

Closed nfischer closed 7 years ago

nfischer commented 7 years ago

Currently, it isn't possible to do something like cat file.txt | shx grep 'foo'. It looks like shx isn't passing stdin along to the ShellJS command (although most commands actually support this).

This is currently blocking my work on shelljs/shelljs#525 (I'd like to replace .exec('grep...') with .exec('shx grep...')).

This should be an easy fix, if someone wants to take it up. Looks like we'll only have to change these lines to call the shelljs function with a different this parameter (see the piping docs).

levithomason commented 7 years ago

With my plate, it will be while before this comes to the front of line for me. Whoever is able to take it I say go for it.