-
Notifications
You must be signed in to change notification settings - Fork 744
fix: echo -e should not print "-e" #510
Copy link
Copy link
Closed
Labels
Description
Node version (or tell us if you're using electron or some other framework):
any
ShellJS version (the most recent version/Github branch you see the bug on):
master
Operating system:
any
Description of the bug:
In bash, echo -e just means to interpret backslashes specially (i.e. '\n' is a newline, instead of a literal '\n'). This is the default behavior for ShellJS echo() (since that's how console.log() works), so we should document it. Also, we should allow the -e option, and just make it a no-op.
Example ShellJS command to reproduce the error:
> echo('-e', 'Any message'); // This should not print '-e'
-e Any message
> echo('Any message'); // The previous command should do the same thing as this command
Any messageReactions are currently unavailable