shelljs/commands.js
Nate Fischer a421b9e3a5
feat: add shell.cmd to replace exec (#866)
This adds an initial implementation of shell.cmd(), which is intended as
the eventual replacement for shell.exec(). This PR does not fully
implement the API, but demonstrates a simple and secure alternative, and
will allow further iteration to cover other use cases in follow-up PRs.

Design doc: https://shelljs.page.link/cmd-design

Issue #495
Test: automated test suite
2019-10-29 18:35:14 -07:00

32 lines
360 B
JavaScript

module.exports = [
'cat',
'cd',
'chmod',
// TODO(nfischer): uncomment this when shell.cmd() is finished.
// 'cmd',
'cp',
'dirs',
'echo',
'exec',
'find',
'grep',
'head',
'ln',
'ls',
'mkdir',
'mv',
'pwd',
'rm',
'sed',
'set',
'sort',
'tail',
'tempdir',
'test',
'to',
'toEnd',
'touch',
'uniq',
'which',
];