composewell / streamly-shell

Shell programming using streamly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add convenience commands

harendra-kumar opened this issue · comments

For example:

  • to run a shell command purely as an effect, without using the output
  • to run the command printing the full command on stdout (runVerbose)

And any other such useful utilities for day to day scripting. Utility commands that are not standard can go in a Contrib or some such module.

run :: String -> IO ()
run cmd = Sh.srcWith Process.toChunks cmd & Stdio.putChunks

runVerbose :: String -> IO ()
runVerbose cmd = putStrLn cmd >> run cmd

We have added toStdout and several other commands.