-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple String-based process commands -- -- Thin wrappers over System.Process (readProcess, -- readProcessWithExitCode, and rawSystem). The idea is to provide some -- simple common idioms for easy calling out to commands from programs. -- For more advanced shell-scripting or streaming use turtle, shelly, -- command, etc. @package simple-cmd @version 0.1.1 module SimpleCmd -- | Run a command in a process and return stdout cmd :: String -> [String] -> IO String -- | Run command in process, output goes to stdout and stderr cmd_ :: String -> [String] -> IO () -- | Run a command, and return Boolean status cmdBool :: String -> [String] -> IO Bool -- | Run a command, drop stderr, and return stdout cmdIgnoreErr :: String -> [String] -> String -> IO String -- | Run command, return list of stdout lines | since 0.1.1 cmdLines :: String -> [String] -> IO [String] -- | Log a command with a datestamp cmdlog :: String -> [String] -> IO () -- | Run a command in a process, maybe returning output if it succeeds cmdMaybe :: String -> [String] -> IO (Maybe String) -- | Dry-run a command: print it to stdout - more used for debugging cmdN :: String -> [String] -> IO () -- | Run a command hiding stderr, if it succeeds return stdout cmdQuiet :: String -> [String] -> IO String -- | Run a command hiding stdout: stderr is only output if it fails. cmdSilent :: String -> [String] -> IO () -- | Run a command, passing input string as stdin, and return stdout cmdStdIn :: String -> [String] -> String -> IO String -- | Run command in a process, returning stdout and stderr cmdStdErr :: String -> [String] -> IO (String, String) -- | grep for extended regexp in file, and return Boolean status egrep_ :: String -> FilePath -> IO Bool -- | grep a pattern in file and return Boolean status grep_ :: String -> FilePath -> IO Bool logMsg :: String -> IO () -- | Remove a prefix from a string if there removePrefix :: String -> String -> String -- | Remove prefix, or fail with error removeStrictPrefix :: String -> String -> String -- | Remove a suffix from a string if there removeSuffix :: String -> String -> String -- | Run a command string in a shell, and return stdout shell :: String -> IO String -- | Run a command string in a shell, output goes to stdout shell_ :: String -> IO () -- | sudo a command sudo :: String -> [String] -> IO () -- | Combine strings with a single space (+-+) :: String -> String -> String infixr 4 +-+ module SimpleCmd.Git -- | Run git command and return output git :: String -> [String] -> IO String -- | Run git command with output to stdout and stderr git_ :: String -> [String] -> IO () -- | Return the git branch of the current directory gitBranch :: IO String -- | grep ".git/config" | since 0.1.1 grepGitConfig :: String -> IO Bool -- | Check if directory has a .git/ dir isGitDir :: FilePath -> IO Bool -- | Check if a git repo is under ssh rwGitDir :: IO Bool module SimpleCmd.Rpm -- | Run rpmspec query on file with optional args, a newline is appended to -- any queryformat | since 0.1.1 rpmspec :: [String] -> Maybe String -> FilePath -> IO [String]