- Source:
Methods
dir(dir) → {shell.Proc}
- Source:
Set working directory for process
Parameters:
Name | Type | Description |
---|---|---|
dir |
string | Path to a directory |
Returns:
The same object where it is being invoked (for chaining)
- Type
- shell.Proc
do() → {ProcResult}
- Source:
- See:
Run a complete execution graph and wait for it to finish.
Throws:
Returns:
The result of waiting for the last (deepest) child
- Type
- ProcResult
env(vars) → {shell.Proc}
- Source:
Set environment variables for process
Parameters:
Name | Type | Description |
---|---|---|
vars |
object | A hash of key value pairs. Note that a null value unsets the variable. |
Returns:
The same object where it is being invoked (for chaining)
- Type
- shell.Proc
pipe(fdsopt, where) → {shell.Proc}
- Source:
Redirect a process file descriptor to a capture module:shell.capture, file module:shell.file, here string module:shell.here, or another process module:shell.$.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fds |
number | Array.<number> |
<optional> |
[1]
|
Process' file descriptors to pipe to the capture, file, here string or process. Note that, in the case of capture or processes, only output file descriptors make sense. In the case of here string, only input file descriptors make sense. |
where |
object | Proc | number | string | Array.<string> | null | Polymorphic parameter to express where to pipe to. Depending on the type it can be: -Proc: redirects output of this process to the other process. Valid
source -Opaque return from module:shell.capture: redirects output of
this process to an object variable. Valid fds are 1 and 2 which store to
properties -Opaque return from module:shell.file: redirects input/output from/to a file. All fds are valid. -Opaque return from module:shell.here: redirects input from a string variable. Only fd 0 (stdin) is valid. -number: the source fds are redirected to the given fd -{}: if an empty object is given it is wrapped with module:shell.capture -string: the string is wrapped with module:shell.file with default open mode. If a custom open mode is desired, the file can be prefixed with the mode plus a colon (for example: '+:/tmp/my-file' appends to '/tmp/my-file', '0:out.log' truncates, and so on). -string[]: the one and only string inside the array is wrapped with module:shell.here() -null: same as |
Throws:
Returns:
The same object where it is being invoked (for chaining)
- Type
- shell.Proc