dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

execSync command history #206

Open patrickhousley opened 7 years ago

patrickhousley commented 7 years ago

Is there a way to call execSync without having the command entered into the command history? I have a few situations where I chain commands and it causes the history to be polluted with commands the user didn't actually run (knowingly).

MatthieuLemoine commented 7 years ago

I don't think so, exec is even used in history's unit tests.

laurent22 commented 7 years ago

I think exec and execSync shouldn't add an history entry by default since these two functions can only be called programmatic ally, while the history is reserved for user actions.

It would be a bit like executing a bash script and have all the commands it contains polluting the history, that wouldn't work.