cpH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None.1;<=>?FKTV@}( CA collection of initializers for the three standard process handles#Initialize a handle before using itexit code for command that ranstdin for the command to be runstderr for command that ranworking directoryby default, hPutStrLn stdout(print stdout of command that is executedby default, hPutStrLn stderr(print stderr of command that is executedprint command that is executedEinitializers for the standard process handles when running a command8when running a command, escape shell characters such as 0 rather than passing to the shell for expansion cache of executables in the PATH!should we trace command executionthe trace of command execution'should we exit immediately on any errorfind-command follows symlinks.ShIO is Deprecated in favor of , which is easier to type.2A monadic-conditional version of the "when" guard.Makes a relative path relative to the current Sh working directory. An absolute path is returned as is. To create an absolute path, use 1make the second path relative to the first Uses ., but will canonicalize the paths if necessary=add a trailing slash to ensure the path indicates a directorymakes an absolute path. Like , but on an exception returns nObtain a (reasonably) canonic file path to a filesystem object. Based on "canonicalizePath" in system-fileio.Vbugfix older version of canonicalizePath (system-fileio <= 0.3.7) loses trailing slashMake a relative path absolute by combining with the working directory. An absolute path is returned as is. To create a relative path, use . deprecated+Does a path point to an existing directory?Does a path point to a symlink?!@internally log what occurred. Log will be re-played on failure."dList directory contents. Does *not* include "." and "..", but it does include (other) hidden files.#Ksilently uses the Right or Left value of "Filesystem.Path.CurrentOS.toText"$a print lifted into %a print lifted into  using stderr&nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.'nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.(nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.)nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.**A helper to catch any exception (same as ...  (e :: SomeException) -> ...).anchor path, the prefix!make this relative to anchor pathLeft is canonic of second pathanchor path, the prefix!make this relative to anchor pathanchor path, the prefix!make this relative to anchor pathE  !"#$%&'()*  NoneQ+List directory recursively (like the POSIX utility "find"). listing is relative if the path given is relative. If you want to filter out some results or fold over them you can do that with the returned files. A more efficient approach is to use one of the other find functions.,+m that filters the found files as it finds. Files must satisfy the given filter to be returned in the result.-6Fold an arbitrary folding function over files froma a +. Like ,2 but use a more general fold rather than a filter..+ that filters out directories as it finds Filtering out directories can make a find much more efficient by avoiding entire trees of files./similar ,=, but also filter out directories Alternatively, similar to .Y, but also filter out files Filtering out directories makes the find much more efficient0like /n but use a folding function rather than a filter The most general finder: you likely want a more specific one/directory filter file filter directory+,-./0None 1;=CFTVTb16Shelly's wrapper around exceptions thrown in its monad89You need to wrap exception handlers with this when using K.2Helper to convert a Text to a FilePath. Used by '( / )' and '( .)';For the variadic function ?<partially applied variadic functions require type signatures=8Argument converter for the variadic argument version of  called ?7. Useful for a type signature of a function that uses ??variadic argument version of #. Please see the documenation for .The syntax is more convenient, but more importantly it also allows the use of a FilePath as a command argument. So an argument can be a Text or a FilePath without manual conversions. a FilePath is automatically converted to Text with #.Convenient usage of ? requires the following: {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} import Shelly import qualified Data.Text as T default (T.Text)@Duses System.FilePath.CurrentOS, but can automatically convert a TextADuses System.FilePath.CurrentOS, but can automatically convert a TextCTransfer from one handle to another For example, send contents of a process output to stdout. does not close the write handle.?Also, return the complete contents being streamed line by line.DTransfer from one handle to another For example, send contents of a process output to stdout. does not close the write handle.8Also, fold over the contents being streamed line by lineEsame as !, but use it combinator styleGSame as a normal " but specialized for the Sh monad.HSame as a normal " but specialized for the Sh monad.ISame as a normal  but specialized for the  monad.KSame as a normal , but specialized for the  monad.L$Catch any exception in the Sh monad.M%Handle any exception in the Sh monad.NChange current working directory of Sh. This does *not* change the working directory of the process we are running it. Instead, Sh keeps track of its own working directory and builds absolute paths internally instead of passing down relative paths.ONV, execute a Sh action in the new directory and then pop back to the original directoryPO4, but first create the directory if it does not exit/apply a String IO operations to a Text FilePathQMove a file. The second path could be a directory, in which case the original file is moved into that directory. wraps system-fileio  ), which may not work across FS boundariesR%Get back [Text] instead of [FilePath]S*Obtain the current (Sh) working directory.T<exit 0 means no errors, all other codes are error conditionsU%echo a message and exit with status 1V>for exiting with status > 0 without printing debug informationWfail that takes a TextX7Create a new directory (fails if the directory exists).YVCreate a new directory, including parents (succeeds if the directory already exists).ZCreate a new directory tree. You can describe a bunch of directories as a tree and this function will create all subdirectories. An example: 8exec = mkTree $ "package" # [ "src" # [ "Data" # leaves ["Tree", "List", "Set", "Map"] ], "test" # leaves ["QuickCheck", "HUnit"], "dist/doc/html" # [] ] where (#) = Node leaves = map (# [])[3Get a full path to an executable by looking at the PATHR environement variable. Windows normally looks in additional places besides the PATH(: this does not duplicate that behavior.3Get a full path to an executable by looking at the PATHR environement variable. Windows normally looks in additional places besides the PATH(: this does not duplicate that behavior..A monadic findMap, taken from MissingM package\%A monadic-conditional version of the  guard.]3Does a path point to an existing filesystem object?^&Does a path point to an existing file?_3Test that a file is in the PATH and also executable`A swiss army cannon for removing things. Actually this goes farther than a normal rm -rf, as it will circumvent permission problems for the files we own. Use carefully. Uses a^Remove a file. Does not fail if the file does not exist. Does fail if the file is not a file.b:Remove a file. Does fail if the file does not exist (use a instead) or is not a file.cSet an environment variable. The environment is maintained in Sh internally, and is passed to any external commands to be executed.d+add the filepath onto the PATH env variablee:prepend the filepath to the PATH env variable similar to dA but gives high priority to the filepath instead of low priority.gget the full environmenthcFetch the current value of an environment variable. if non-existant or empty text, will be Nothingi deprecatedjyFetch the current value of an environment variable. Both empty and non-existent variables give empty string as a result.kFetch the current value of an environment variable. Both empty and non-existent variables give the default Text value as a resultlPApply a single initializer to the two output process handles (stdout and stderr)m[Apply a single initializer to all three standard process handles (stdin, stdout and stderr)nWhen running an external command, apply the given initializers to the specified handles for that command. This can for example be used to change the encoding of the handles or set them into binary mode.oeCreate a sub-Sh in which external command outputs are not echoed and commands are not printed. See v.peCreate a sub-Sh in which external command outputs are echoed and Executed commands are printed See v.qXCreate a sub-Sh in which stdout is sent to the user-defined logger. When running with om the given log will not be called for any output. Likewise the log will also not be called for output from  and  commands.rXCreate a sub-Sh in which stderr is sent to the user-defined logger. When running with oC the given log will not be called for any output. However, unlike q) the log will be called for output from  and  commands.sACreate a sub-Sh with stdout printing on or off Defaults to True.tACreate a sub-Sh with stderr printing on or off Defaults to True.uRCreate a sub-Sh with command echoing on or off Defaults to False, set to True by pvEnter a sub-Sh that inherits the environment The original state will be restored when the sub-Sh completes. Exceptions are propagated normally.wCreate a sub-Sh where commands are not traced Defaults to True. You should only set to False temporarily for very specific reasonsxFCreate a sub-Sh with shell character escaping on or off. Defaults to True. Setting to False allows for shell wildcard such as * to be expanded by the shell along with any other special shell characters. As a side-effect, setting to False causes changes to PATH to be ignored: see the  documentation.y)named after bash -e errexit. Defaults to True. When True4, throw an exception on a non-zero exit code. When False:, ignore a non-zero exit code. Not recommended to set to False: unless you are specifically checking the error code with .z+--command follows symbolic links. Defaults to False. When True, follow symbolic links. When False, never follow symbolic links.{Deprecated now, just use }L, whose default has been changed. Using this entry point does not create a .shelly] directory in the case of failure. Instead it logs directly into the standard error stream (stderr).|!Using this entry point creates a .shelly= directory in the case of failure where errors are recorded.}Enter a Sh from (Monad)IO. The environment and working directories are inherited from the current process-wide values. Any subsequent changes in processwide working directory or environment are not reflected in the running Sh.same as , but returns ()same as  sshPairsP, but returns ()frun commands over SSH. An ssh executable is expected in your path. Commands are in the same form as , but given as pairs <sshPairs "server-name" [("cd", "dir"), ("rm",["-r","dir2"])].This interface is crude, but it works for now.Please note this sets xf to False, and the remote commands are quoted with single quotes, in a way such that the remote commands will see the literal values you passed, this means that no variable expansion and alike will done on either the local shell or the remote shell, and that if there are a single or double quotes in your arguments, they need not to be quoted manually.=Internally the list of commands are combined with the string && before given to ssh.8Same as sshPairs, but combines commands with the string &', so they will be started in parallell.Like ., but allows for arguments to the call to ssh.CExecute an external command. Takes the command name and arguments.You may prefer using ?A instead, which is a variadic argument version of this function. and  are collected. The  is returned as a result of @, and complete stderr output is available after the fact using kAll of the stdout output will be loaded into memory. You can avoid this if you don't need stdout by using K, If you want to avoid the memory and need to process the output then use  or  or .kBy default shell characters are escaped and the command name is a name of a program that can be found via PATH . Shelly will look through the PATH itself to find the command.When x is set to False, shell characters are allowed. Since there is no longer a guarantee that a single program name is given, Shelly cannot look in the PATH for it. a PATHo modified by setenv is not taken into account when finding the exe name. Instead the original Haskell program PATH! is used. On a Posix system the env! command can be used to make the c PATH used when x is set to False. env echo hello instead of  echo helloLike 8, but it invokes the user-requested program with _bash_.Use this with  to set _pipefail_ %bashPipeFail $ bash "echo foo | echo"/bind some arguments to run for re-use. Example: Cmonit = command "monit" ["-c", "monitrc"] monit ["stop", "program"]bind some arguments to  for re-use. Example: Fmonit_ = command_ "monit" ["-c", "monitrc"] monit_ ["stop", "program"]Gbind some arguments to run for re-use, and require 1 argument. Example: 8git = command1 "git" []; git "pull" ["origin", "master"]Gbind some arguments to run for re-use, and require 1 argument. Example: :git_ = command1_ "git" []; git "pull" ["origin", "master"] the same as  , but return ()N instead of the stdout content stdout will be read and discarded line-by-line Similar to T but gives the raw stdout handle in a callback. If you want even more control, use . Similar to 9 but gives direct access to all input and output handles.Be careful when using the optional input handles. If you specify Inherit for a handle then attempting to access the handle in your callback is an errorused by . fold over stdout line-by-line as it is read to avoid keeping it in memory stderr is still being placed in memory under the assumption it is always relatively small)The output of last external command. See .5The exit code from the last command. Unless you set y[ to False you won't get a chance to use this: a non-zero exit code will throw an exception.1set the stdin to be used and cleared by the next .Pipe operator. set the stdout the first command as the stdin of the second. This does not create a shell-level pipe, but hopefully it will in the future. To create a shell level pipe you can set escaping False and use a pipe | character in a command./Copy a file, or a directory recursively. uses tCopy a file. The second path could be a directory, in which case the original file name is used, in that directory.pCreate a temporary directory and pass it as a parameter to a Sh computation. The directory is nuked afterwards.Write a Text to a file.<Update a file, creating (a blank file) if it does not exist.Append a Text to a file.wraps ByteSting readFileflipped hasExtension for TextRun a Sh computation and collect timing information. The value returned is the amount of _real_ time spent running the computation in seconds, as measured by the system clock. The precision is determined by the resolution of .%threadDelay wrapper that uses seconds=spawn an asynchronous action with a copy of the current state Server name.$Arguments to ssh (e.g. ["-p","22"]).'Pairs of commands to run on the remote.Returns the standard output.command arguments stdout handlecommand arguments:optionally connect process i/o handles to existing handlesstdin, stdout and stderr out handle in handle&should it be printed while transfered?filepath conversiontracing statementconverted filepath  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~}{|vopxstunwyqr?:345;<=>CD lmchjikgfdeNOPS&'()$%E!~"R]^_[@AQba`XYZTUVWJ*GHMI89KL1267#B \  F+,-./0z123456789;<=>None1;<=CFQRTV% nObtain a (reasonably) canonic file path to a filesystem object. Based on "canonicalizePath" in system-fileio.command arguments stdout handlecommand arguments:optionally connect process i/o handles to existing handlesstdin, stdout and stderr anchor path, the prefix!make this relative to anchor path #+,-./0:;<=>?@AD\{|}~     }{|?:;<=>D~ @A    # \ +,-./0$%&'()*+,-./None ;=CFTVD^/Converter for the variadic argument version of E called .0see 82)This type is a simple wrapper for a type  Shelly.Sh. 2 contains a list of results. 3Unpack list of results.4"Pack list of results. It performs concat inside 2.5:Transform result as list. It can be useful for filtering. 6see }7 Performs 6 and then an empty action  return (). 8see |9 Performs 8 and then an empty action  return ().:see v=see x>see q?see r@see sAsee 'S.print_commandsBsee wCsee yDsee zEsee Fsee Gsee Hsee Isee Jsee Ksee Lsee Msee Nsee Osee Psee Qsee Rsee cSsee hTsee jUsee kVsee dWsee eXsee NYsee OZsee S[nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.\nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.]nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline.^nEcho text to standard (error, when using _err variants) output. The _n variants do not print a final newline._see $`see %asee Ebsee !csee ~dsee "esee Rfsee ]gsee ^hsee isee j see 'S.whichksee lsee msee nsee osee psee Qqsee brsee assee `tsee usee vsee Xwsee Yxsee Zysee  zsee {see  |see  }see  ~see see +see ,see -see .see /see  see Tsee Usee Vsee Wsee Gsee Lsee Isee see Ksee Bsee ?oanchor path, the prefix!make this relative to anchor pathdirectory filter file filter directoryp #*:@A\0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~p27689:;<=@ABC>?435:EFGHIJKLMNOPQRSTUVWXYZ[^]\_`abcdefghijk@Almnopqrstuvwxyz{}|~*01# \ D012NoneG !"#!$%&&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\fg;YZ:]^_`abcdehijklmnopqrtuvwxyz{|~@ABC2345689<>?DPP/z{|efj@CBA>?\;<itu89r64523hyxwopqEFGHIJklmn^c`bY:]V     / !"#$$%&'&()*+,-./010234567889:;<=>?@ABCDEFGHIJKLMNOPQRSSU/T#shelly-1.7.2-FtIytMIYg7F6gjMVqt5qB3Shelly Shelly.Lifted Shelly.Pipe Shelly.Unix Shelly.Base Filesystem stripPrefix Shelly.Find FileSystemrenameSreadFile writeFile touchFile appendFilefindFoldDirFilterWhenbaseControl.Monad.IO.ClassliftIO Control.Monadunless Data.Functor<$>GHC.Basewhenprocess-1.6.1.0System.Process.CommonNoStream CreatePipe UseHandleInherit StdStream,system-filepath-0.4.14-JFMwAOJLZbosQTaZ0Q2MmFilesystem.Path.InternalFilePathFilesystem.Path.CurrentOSfromTextStdInitinInitoutIniterrInitHandleInitializer StdHandleInHandle OutHandle ErrorHandleShShIOwhenMrelPath relativeTocanonic canonicalizeabsPathpathtest_dtest_sgettracels toTextIgnoreinspect inspect_errechoecho_necho_err echo_n_errcatchanyfindfindWhenfindFold findDirFilterfindDirFilterWhenfindFoldDirFilterReThrownExceptionSshModeParSshSeqSsh RunFailed ShellyHandler FoldCallbackShellCmdcmdAllCmdArg toTextArgcmd<.> toTextWarntransferLinesAndCombinetransferFoldHandleLinestagputcatch_sh handle_sh finally_sh bracket_sh catches_sh catchany_sh handleany_shcdchdirchdir_pmvlsTpwdexit errorExit quietExitterrormkdirmkdir_p mkdirTreewhichunlessMtest_etest_ftest_pxrm_rfrm_frmsetenv appendToPath prependToPathget_environment get_env_allget_envgetenv get_env_text get_env_definitOutputHandlesinitAllHandlesonCommandHandlessilently verboselylog_stdout_withlog_stderr_with print_stdout print_stderrprint_commandssubtracingescapingerrExit followSymlink shellyNoDir shellyFailDirshelly show_command sshPairs_ sshPairsPar_sshPairs sshPairsParsshPairsWithOptionssshCommandTextrunbashbash_ bashPipeFailcommandcommand_command1 command1_run_ runHandle runHandles runFoldLines lastStderr lastExitCodesetStdin-|-cp_rcp withTmpDir writefile writeBinary touchfile appendfilereadfile readBinaryhasExttimesleepasyncSh $fCmdArg[]$fCmdArgFilePath $fCmdArgText$fShellCmd(->)$fShellCmd(->)0 $fShellCmdSh $fShellCmdSh0 $fShellCmdSh1$fToFilePath[]$fToFilePathText$fToFilePathFilePath$fExceptionRunFailed$fShowRunFailed$fExceptionQuietExit$fShowReThrownException$fExceptionReThrownException$fShowQuietExitMonadShControlShM liftShWith restoreShMonadShliftSh $fShellCmdm $fShellCmdm0 $fShellCmdm1 $fMonadShRWST$fMonadShRWST0$fMonadShWriterT$fMonadShWriterT0$fMonadShStateT$fMonadShStateT0$fMonadShReaderT$fMonadShErrorT$fMonadShContT$fMonadShMaybeT$fMonadShListT$fMonadShIdentityT $fMonadShSh$fMonadShControlRWST$fMonadShControlRWST0$fMonadShControlReaderT$fMonadShControlStateT$fMonadShControlStateT0$fMonadShControlErrorT$fMonadShControlWriterT$fMonadShControlWriterT0$fMonadShControlIdentityT$fMonadShControlMaybeT$fMonadShControlListT$fMonadShControlShunrollrollshs shsFailDir $fMonadIOSh $fMonadPlusSh$fAlternativeSh$fApplicativeSh $fMonadSh $fFunctorSh$fShellArgFilePath$fShellArgText$fShellCommand(->)$fShellCommandSh$fShellCommandSh0$fShellCommandSh1killsCodesStdinsStderr sDirectory sPutStdout sPrintStdout sPutStderr sPrintStderrsPrintCommandssInitCommandHandlessCommandEscapingGHC.Num*sPathExecutablessTracingsTracesErrExitsFollowSymlinkaddTrailingSlashcanonicalizePathGHC.IOcatcheitherRelativeTomaybeRelativeTo>=>#text-1.2.2.2-EakMpasry3jA6OIwSZhq9MData.Text.InternalTextState sEnvironment sReadOnly ReadOnlyState rosFailToDirunShrunShunpackgetsmodifylsRelAbsEmptyFilePathError ToFilePathControl.Exception.BasehandlefinallyControl.Exceptioncatchespack whichEithfindMapM-system-fileio-0.3.16.3-IlMcXqnT7VTH3PFD3X3u81 removeTreeGHC.IO.Handle.FDstdoutstderr time-1.8.0.2Data.Time.Clock.POSIXgetCurrentTimeputHandleIntoMVar tracePath QuietExit toFilePath D:R:ShMRWSTa0 StRWSTShM D:R:ShMRWSTa2RWSTShMD:R:ShMReaderTa0 ReaderTShMD:R:ShMStateTa0 StStateTShMD:R:ShMStateTa2 StateTShMD:R:ShMErrorTa0 ErrorTShMD:R:ShMWriterTa0 StWriterTShMD:R:ShMWriterTa2 WriterTShMD:R:ShMIdentityTa0 IdentityTShMD:R:ShMMaybeTa0 MaybeTShMD:R:ShMListTa0ListTShM D:R:ShMSha0ShShShellArg ShellCommand