Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains neat utilities to be able to work with shell commands in generic and simple way using just string literals.
>>>
"echo" ["Hello", "World!"]
⚙ echo Hello 'World!' Hello World!
Documentation
($|) :: FilePath -> [Text] -> IO Text infix 5 Source #
Run shell command with given options and return stripped stdout of the executed command.
>>>
"echo" $| ["Foo", "Bar"]
"Foo Bar"
($?) :: IO () -> IO () -> IO () infixl 4 Source #
Do some IO actions when processed failed with error.
>>>
"exit" ["0"] $? putStrLn "Command failed"
⚙ exit 0
>>>
"exit" ["1"] $? putStrLn "Command failed"
⚙ exit 1 Command failed
Orphan instances
(a ~ [Text], b ~ IO ()) => IsString (a -> b) Source # | This instance is needed to provide functionality to call commands by using
simple string literals in
|
fromString :: String -> a -> b # |