| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Control.Monad.Shell.Quote
Description
Shell quoting
Documentation
A value that is safely quoted so that it can be exposed to the shell.
While the constructor is exposed, you should avoid directly constucting
Quoted values. Instead, use quote.
Instances
| Eq a => Eq (Quoted a) Source # | |
| Ord a => Ord (Quoted a) Source # | |
Defined in Control.Monad.Shell.Quote | |
| Show a => Show (Quoted a) Source # | |
| IsString (Quoted Text) Source # | |
Defined in Control.Monad.Shell.Quote Methods fromString :: String -> Quoted Text # | |
| Semigroup a => Semigroup (Quoted a) Source # | |
| Monoid a => Monoid (Quoted a) Source # | |
| Param (Quoted Text) Source # | Quoted Text arguments are passed as-is. |
Defined in Control.Monad.Shell Methods toTextParam :: Quoted Text -> Env -> Text | |
class Quotable t where Source #
Quotes a value to allow it to be safely exposed to the shell.
The method used is to replace ' with '"'"' and wrap the value inside single quotes. This works for POSIX shells, as well as other shells like csh.
Minimal complete definition