shelljs / shx

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

Add "true" and "false" commands #105

Closed freitagbr closed 6 years ago

freitagbr commented 7 years ago

I think it would be helpful to add the unix true and false commands to shx. I don't know if these should be added to ShellJS itself, or simply parsed out and interpreted directly in shx, though I think I'd lean toward the latter.

nfischer commented 7 years ago

Might be good to implement those two as one shelljs plugin.

What's the use case for shx? Is it just to do something like:

  "foo": "commandThatMayFail || shx true"

...

$ npm run foo

to avoid the ugly npm error message without using --silent?

nfischer commented 6 years ago

@freitagbr any interest in creating shelljs-plugin-true-false? Do you think there's still a use-case for shx true and shx false?