Skip to main content

Module shell_quote

Module shell_quote 

Source
Expand description

Quote words for a command line that a person or an agent copies and runs.

Paths in such a command come from the project config or the environment. A path must stay one argument and must never add a command of its own.

Functionsยง

posix_quote
Single quotes, with an inner ' written as '\''. A POSIX shell expands nothing inside single quotes.
shell_quote
Quote word for the shell of this platform: a POSIX shell on Unix, and cmd or PowerShell on Windows. A plain word stays as it is.
windows_quote
Quote for cmd and PowerShell. Backslashes stay single, because Windows paths use them.