babashka.process
(source)Clojure library for shelling out / spawning sub-processes.
If you are not yet familiar with the API, start reading the
docstrings for `process` and `shell`.
Public Variable | Short Description |
---|---|
$ (clj) | Convenience macro around `process`. |
*defaults* (clj) | Dynamic var containing overridable default options. |
->Process (clj) | |
->ProcessBuilder (clj) | |
Process (clj) | |
ProcessBuilder (clj) | |
alive? (clj) | Returns `true` if the process is still running and false otherwise. |
check (clj) | Takes a process, waits until is finished and throws if exit code is non-zero. |
destroy (clj) | Destroys the process and returns the input arg. |
destroy-tree (clj) | Same as `destroy` but also destroys all descendants. |
exec (clj) | Replaces the current process image with the process image specified by the given path invoked with the given args. |
map->Process (clj) | |
map->ProcessBuilder (clj) | |
parse-args (clj) | Parses arguments to `process` to map with: * `:prev`: a (previous) process whose input is piped into the current process * `:cmd`: a vector of command line argument strings * `:opts`: options map Note that this function bridges the legacy `[cmds ?opts]` syntax to the newer recommended syntax `[?opts & args]` and therefore looks unnecessarily complex. |
pb (clj) | Returns a process builder (as record). |
pipeline (clj) | Returns the processes for one pipe created with -> or creates pipeline from multiple process builders. |
process (clj) | Creates a child process. |
process* (clj) | Same as with `process` but called with parsed arguments (the result from `parse-args`). |
sh (clj) | Convenience function similar to `clojure.java.shell/sh` that sets `:out` and `:err` to `:string` by default and blocks. |
shell (clj) | Convenience function around `process` that was originally in `babashka.tasks`. |
start (clj) | Takes a process builder, calls start and returns a process (as record). |
tokenize (clj) | Tokenize string to list of individual space separated arguments. |