shlex-quote ( string -- quoted )
Shell-like lexical analysis

Prev:shlex-split ( string comments? posix? -- tokens )
Next:shlex-join ( tokens -- string )


Vocabulary
shlex

Inputs
stringa string


Outputs
quoteda string


Word description
Quotes one argument for a POSIX shell, like Python's shlex.quote. Empty strings become two single quotes; shell-safe ASCII arguments are unchanged. Other strings are single-quoted with embedded single quotes escaped.

Notes
This quoting is for POSIX shells, not Windows command interpreters.

Definition