| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Shellmet
Contents
Description
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 a -> IO a -> IO a infixl 4 Source #
Do some IO actions when process failed with IOError.
>>>"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
|
Methods fromString :: String -> a -> b # | |