Function: shlex()
shlex(
command):string[]
Splits a shell-like command into argv.
Supports:
- whitespace separators
- single and double quotes
- backslash escaping
- escaped spaces
- empty quoted strings
If the input is malformed (for example, an unterminated quote), returns the original string as a single argument.
Parameters
Section titled “Parameters”command
Section titled “command”string
Returns
Section titled “Returns”string[]