3 releases (breaking)
0.3.0 | Apr 3, 2022 |
---|---|
0.2.0 | Apr 2, 2022 |
0.1.0 | Feb 5, 2020 |
#22 in #escape
1,015 downloads per month
Used in postgresfixture
24KB
418 lines
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.