@hackage simple-cmd0.1.3.1
Simple String-based process commands
Categories
License
BSD-3-Clause
Maintainer
juhpetersen@gmail.com
Links
Versions
Installation
Tested Compilers
Dependencies (5)
Dependents (25)
@hackage/koji-install, @hackage/stackage-query, @hackage/rhbzquery, @hackage/fedora-img-dl, @hackage/rpmostree-update, @hackage/pagure-cli, Show all…
simple-cmd
Some simple String wrappers of readProcess, readProcessWithExitCode,
rawSystem from the Haskell process library.
Usage
import SimpleCmd
cmd_ :: String -> [String] -> IO ()
outputs to stdout. For example
cmd_ "git" ["clone", url]
This can shortened to git_ "clone" [url].
cmd :: String -> [String] -> IO String
returns stdout as a String.
There are also cmdBool, cmdMaybe, cmdList, shell, and others.
Other examples:
gitBranch :: IO String
grep_ pat file :: IO Bool
sudo c args :: IO ()
See the library documentation for more details.

