Simple String-based process commands

Version on this page:0.1.4
LTS Haskell 21.22:0.2.7
Stackage Nightly 2023-12-01:0.2.7
Latest on Hackage:0.2.7

See all snapshots simple-cmd appears in

BSD-3-Clause licensed by Jens Petersen
Maintained by
This version can be pinned in stack with:simple-cmd-0.1.4@sha256:b3c74e05159406d243c450969d2fbe0b297bdbd0d2027933cae8c16760aeeb92,1356

Module documentation for 0.1.4

Used by 1 package in lts-13.19(full list with versions):

Build Status Hackage


Some simple String wrappers of readProcess, readProcessWithExitCode, rawSystem from the Haskell process library.


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.


Revision history for simple-cmd


  • export error’
  • add cmdLog (deprecates cmdlog)

  • sudo: ignored for root or when no sudo installed

0.1.3 – 2019-02-20

  • gitDiffQuiet
  • fix rwGitDir regexp
  • use errorWithoutStackTrace

0.1.2 – 2018-10-28

  • grep
  • improve haddock documentation

0.1.1 – 2018-10-02

  • cmdLines
  • Git: grepGitConfig
  • new Rpm: rpmspec – 2018-09-13

  • Initial release, providing: cmd, cmd_, cmdBool, cmdMaybe, cmdStdIn, cmdlog, cmdN, cmdIgnoreErr, cmdQuiet, cmdSilent, cmdStdErr, egrep_, grep_, logMsg, removePrefix, removeStrictPrefix, removeSuffix, shell, shell_, sudo, (+-+)
  • A few git commands

Local Variables:

mode: text