Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
ShellWords
Splitting shell words
Quoting for shells
quote :: String -> String Source #
Escape special characters in a string, so that it will retain its literal meaning when used as a part of command in a Unix shell.
It tries to avoid introducing any unnecessary quotes or escape characters, but specifics regarding quoting style are left unspecified.
join :: [String] -> String Source #
Joins arguments into a single command line suitable for execution in a Unix shell.
Each argument is quoted using quote
to preserve its literal meaning when
parsed by Unix shell.
Note: This function is essentially an (infallible) inverse of parse
.