escapeCommand
escapeCommand(
cmd,dialect):string
Defined in: command/shell-dialect.ts:50
Escape any characters in a string that might be used to trick a command line written in the given dialect into executing arbitrary commands.
Prefer escapeCommandArg whenever the string is one argument rather than a
whole command: neutralizing metacharacters leaves a string that the shell
still splits on whitespace.
Parameters
Section titled “Parameters”string
The command to escape
dialect
Section titled “dialect”The shell language the command is written in
Returns
Section titled “Returns”string
The escaped command