Expand description

shell-quote

This escapes strings in a way that they can be inserted into shell scripts without the risk that they’re interpreted as, say, multiple arguments (like with Bash’s word splitting), paths (Bash’s pathname expansion), shell metacharacters, function calls, or other syntax. This is frequently not as simple as wrapping a string in quotes.

Inspired by the Haskell shell-escape package, which is the most comprehensive implementation of shell escaping I’ve yet seen.

For now this package implements escaping for /bin/sh-like shells and GNU Bash. Please read the documentation for each module to learn about some limitations and caveats.

Modules

Quote strings for use with Bash, the GNU Bourne-Again Shell.

Quote strings for use with /bin/sh.