ú΃Ö~ºS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR Safe-InferedC =Type returned by tasks run asynchronously in the background. "variadic argument version of run. X The syntax is more convenient but it also allows the use of a FilePath as an argument. * An argument can be a Text or a FilePath. & a FilePath is converted to Text with . 4 You will need to add the following to your module: $ {-# LANGUAGE OverloadedStrings #-} ' {-# LANGUAGE ExtendedDefaultRules #-} - {-# OPTIONS_GHC -fno-warn-type-defaults #-}  import Shelly  import Data.Text.Lazy as LT  default (LT.Text) Euses System.FilePath.CurrentOS, but can automatically convert a Text Euses System.FilePath.CurrentOS, but can automatically convert a Text )silently uses the Right or Left value of  Filesystem.Path.CurrentOS.toText same as , but use it combinator style log actions that occur )A helper to catch any exception (same as  ... S (e :: SomeException) -> ...). &Catch an exception in the ShIO monad. &Catch an exception in the ShIO monad. EChange current working directory of ShIO. This does *not* change the I working directory of the process we are running it. Instead, ShIO keeps J track of its own workking directory and builds absolute paths internally C instead of passing down relative paths. This may have performance D repercussions if you are doing hundreds of thousands of filesystem N operations. You will want to handle these issues differently in those cases. cdY, execute a ShIO action in the new directory and then pop back to the original directory )makes an absolute path. Same as canonic. * TODO: use normalise from system-filepath makes an absolute path. path will also normalize  Currently a  renameFile) wrapper. TODO: Support cross-filesystem F move. TODO: Support directory paths in the second parameter, like in cp. Get back [Text] instead of [FilePath] ,List directory contents. Does *not* include "." and "..", but it does  include (other) hidden files. 3List directory recursively (like the POSIX utility find). -Obtain the current (ShIO) working directory. GEcho text to standard (error, when using _err variants) output. The _n ( variants do not print a final newline. GEcho text to standard (error, when using _err variants) output. The _n ( variants do not print a final newline. !GEcho text to standard (error, when using _err variants) output. The _n ( variants do not print a final newline. "GEcho text to standard (error, when using _err variants) output. The _n ( variants do not print a final newline. %fail that takes a Text &a print lifted into ShIO '8Create a new directory (fails if the directory exists). (ECreate a new directory, including parents (succeeds if the directory  already exists). )$Get a full path to an executable on PATH, if exists. FIXME does not  respect setenv'd environment and uses PATH inherited from the process  environment. *IObtain a (reasonably) canonic file path to a filesystem object. Based on  canonicalizePath in FileSystem. +%A monadic-conditional version of the when guard. ,%A monadic-conditional version of the unless guard. -4Does a path point to an existing filesystem object? .'Does a path point to an existing file? /,Does a path point to an existing directory? 0 Does a path point to a symlink? 1KA swiss army cannon for removing things. Actually this goes farther than a K normal rm -rf, as it will circumvent permission problems for the files we  own. Use carefully. 2IRemove a file. Does not fail if the file already is not there. Does fail  if the file is not a file. 3CSet an environment variable. The environment is maintained in ShIO D internally, and is passed to any external commands to be executed. 4,add the filepath onto the PATH env variable  FIXME: see comments for which 5CFetch the current value of an environment variable. Both empty and 7 non-existent variables give empty string as a result. 6CFetch the current value of an environment variable. Both empty and ; non-existent variables give the default value as a result 7DCreate a sub-ShIO in which external command outputs are not echoed.  Also commands are not printed.  See sub. 8@Create a sub-ShIO in which external command outputs are echoed.  Executed commands are printed  See sub. 9Turn on/off printing stdout : Create a T which has a limit( on the max number of background tasks. ` an invocation of jobs is independent of any others, and not tied to the ShIO monad in any way. 4 This blocks the execution of the program until all < jobs are finished. ;DReturns the promised result from a backgrounded task. Blocks until  the task completes. <Run the  0 task asynchronously in the background, returns  the ` BgResult a`, a promise immediately. Run  getBgResult to wait for the result. ; The background task will inherit the current ShIO context  The  BjJobManagerP ensures the max jobs limit must be sufficient for the parent and all children. =Turn on/off command echoing. >/Enter a sub-ShIO that inherits the environment B The original state will be restored when the sub-ShIO completes. % Exceptions are propagated normally. ?IEnter a ShIO from (Monad)IO. The environment and working directories are K inherited from the current process-wide values. Any subsequent changes in G processwide working directory or environment are not reflected in the  running ShIO. AGExecute an external command. Takes the command name (no shell allowed, 0 just a name of something that can be found via PATH; FIXME: setenv'd  PATH6 is not taken into account when finding the exe name) stdout and stderr are collected. The stdout is returned as  a result of run?, and complete stderr output is available after the fact using   lastStderr 4All of the stdout output will be loaded into memory : You can avoid this but still consume the result by using run_, I If you want to avoid the memory and need to process the output then use  runFoldLines. B&bind some arguments to run for re-use  Example: monit = command monit [-c, monitrc] Cbind some arguments to run_ for re-use  Example: monit_ = command_ monit [-c, monitrc] D=bind some arguments to run for re-use, and expect 1 argument  Example: git = command1 git []; git pull [origin, master] E=bind some arguments to run for re-use, and expect 1 argument  Example: git_ = command1_ git []; git+ pull [origin, master] G)The output of last external command. See run. H1set the stdin to be used and cleared by the next run. ILPipe operator. set the stdout the first command as the stdin of the second. J8Run a ShIO computation and collect timing information. K)Copy a file, or a directory recursively. LECopy a file. The second path could be a directory, in which case the 0 original file name is used, in that directory. MCLike filter, but more conveniently used with String lists, where a < substring match (TODO: also provide globs) is expressed as  grep "needle" [ "the", "stack", "of", "hay" ] . Boolean  predicates just like with filter are supported too:  grep ("fun"  isPrefixOf) [...]. N(A functor-lifting function composition. OBCreate a temporary directory and pass it as a parameter to a ShIO 1 computation. The directory is nuked afterwards. PWrite a Lazy Text to a file. QAppend a Lazy Text to a file. R"(Strictly) read file into a Text. $ All other functions use Lazy Text. h So Internally this reads a file as strict text and then converts it to lazy text, which is inefficient ]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRUVWXYZ[\]^_`abcS  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS ?>789=AF IGHBCDE3564"! &@-./0) 21LK'(RPQO:<; #$%NM+,*J[  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRUVWXYZ[\]^_`abcd   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl shelly-0.9.2Shellybase Data.Functor<$> Control.Monadunlesswhentransformers-0.3.0.0Control.Monad.IO.ClassliftIOsystem-filepath-0.4.6Filesystem.Path.InternalFilePathTiming RunFailedBgResultShIOcmd<.> toTextIgnore toTextWarnfromTexttagtracecatchanycatch_sh catchany_shcdchdirpathabsPathmvls'lsfindpwdechoecho_necho_err echo_n_errexit errorExitterrorinspectmkdirmkdir_pwhichcanonicwhenMunlessMtest_etest_ftest_dtest_srm_rfrm_fsetenv appendToPathgetenv getenv_defsilently verbosely print_stdoutjobs getBgResult backgroundprint_commandssubshelly show_commandruncommandcommand_command1 command1_run_ lastStderrsetStdin-|-timecp_rcpgrep<$$> withTmpDir writefile appendfilereadfileControl.Exception.Basecatch BgJobManager$fPredicateLike[][]$fPredicateLike(->)a$fShowReThrownException$fExceptionReThrownException$fExceptionRunFailed$fShowRunFailed$fToFilePath[]$fToFilePathText$fToFilePathText0$fToFilePathFilePath$fShellCommand(->)$fShellCommandReaderT$fShellCommandReaderT0$fShellArgFilePath$fShellArgText