Pipe from the right command's stderr to the left command. Returns the left command modified.
Moduleprocex-0.3.3Haskell2010
Procex.Quick
This module defines functions and type classes for making the syntax more succint.
- 3 classes
- 19 values
- Packageprocex-0.3.3
- Exports22
- LanguageHaskell2010
- LicenceMIT
- SourceQuick.hs
Pass a string as stdin.
Pipe from the right command to the left command. Returns the left command modified.
Pipe from the left command's stderr to the right command. Returns the left command modified.
Pipe from the left command to the right command. Returns the left command modified.
captureFd for stdout.
captureFdNoThrow for stdout.
captureFdLazy for stdout.
captureFdLazyNoThrow for stdout.
captureFd for stderr.
captureFdNoThrow for stderr.
captureFdLazy for stderr..
captureFdLazyNoThrow for stderr.
Capture the output of the fd of the command strictly, err if the command exits with a non-zero exit code.
Capture the output of the fd of the command strictly. Ignores process exit code.
Capture the output of the fd of the command lazily. If the process exits with a non-zero exit code, reading from the bytestring will throw CmdException. Garbage collection will close the pipe.
Capture the output of the fd of the command lazily. Ignores process exit code. Garbage collection will close the pipe.
Pass an argument of the form /proc/self/fd/<n> to the process,
where n is the reader end of a pipe which the passed string is written to.
mq :: (QuickCmd a, ToByteString b)=> bThe path to the executable, uses PATH
-> aEither a Cmd, an
IO (), or a function that takesCmd -> Cmd, String or ByteString
mq "cat" "/dev/null" (pipeArgIn 1 $ mq "cat" "/dev/null") <<< "somestr"The first argument is the path, and the subsequent arguments are QuickCmdArg.
At the end you will either have an IO () (synchronous execution) or Cmd (which you can further use).
If a type implements this, you can pass it to mq.
Methods
quickCmdArg :: a -> Cmd -> Cmd
Instances12QuickCmdArg, …
QuickCmdArg ByteStringDefined in procex-0.3.3 · Procex.QuickQuickCmdArg StringDefined in procex-0.3.3 · Procex.QuickUTF-8 encoded
QuickCmdArg [ByteString]Defined in procex-0.3.3 · Procex.QuickQuickCmdArg [String]Defined in procex-0.3.3 · Procex.QuickQuickCmdArg [Cmd -> Cmd]Defined in procex-0.3.3 · Procex.Quick(a ~ Fd, b ~ Cmd) => QuickCmdArg [(a, (Handle -> IO b) -> IO b)]Defined in procex-0.3.3 · Procex.Quicka ~ Fd => QuickCmdArg [(a, Handle)]Defined in procex-0.3.3 · Procex.Quicka ~ Fd => QuickCmdArg [(a, IO Handle)]Defined in procex-0.3.3 · Procex.QuickQuickCmdArg (Cmd -> Cmd)Defined in procex-0.3.3 · Procex.Quick(a ~ Fd, b ~ Cmd) => QuickCmdArg (a, (Handle -> IO b) -> IO b)Defined in procex-0.3.3 · Procex.Quicka ~ Fd => QuickCmdArg (a, Handle)Defined in procex-0.3.3 · Procex.Quicka ~ Fd => QuickCmdArg (a, IO Handle)Defined in procex-0.3.3 · Procex.Quick
A helper class to convert to bytestrings with UTF-8 encoding
Methods
toByteString :: a -> ByteString
Instances3ToByteString
ToByteString ByteStringDefined in procex-0.3.3 · Procex.QuickToByteString ByteStringDefined in procex-0.3.3 · Procex.Quicka ~ Char => ToByteString [a]Defined in procex-0.3.3 · Procex.Quick