Command Module
Pipe-friendly functions over `Command`, mirroring the instance **builder** methods. The run verbs (`RunAsync`/`OutputStringAsync`/`ParseAsync`/…) are instance methods only — end a pipeline with method syntax (`(cmd |> Command.arg "x").RunAsync()`), or go through `Runner.*` with an explicit runner.
Functions and values
| Function or value |
Description
|
|
|
|
|
Full Usage:
Command.cancelOn cancellationToken command
Parameters:
CancellationToken
command : Command
Returns: Command
|
Also cancel the run when `cancellationToken` fires.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set the child's Unix supplementary groups, replacing the inherited set — the third leg of a privilege drop. Meaningful only alongside a `Uid`/`Gid` drop (else `ProcessError.Spawn`); Unix-only (a set value fails a Windows spawn with `ProcessError.Unsupported`). See `Command.Groups`.
|
|
|
|
|
|
|
Full Usage:
Command.lineTerminator terminator command
Parameters:
LineTerminator
command : Command
Returns: Command
|
Frame both captured/streamed streams' lines with `terminator` (default `LineTerminator.Lf`).
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Command.outputBuffer policy command
Parameters:
OutputBufferPolicy
command : Command
Returns: Command
|
Bound the in-memory backlog of captured lines.
|
|
|
Full Usage:
Command.retry maxAttempts delay shouldRetry command
Parameters:
int
delay : TimeSpan
shouldRetry : ProcessError -> bool
command : Command
Returns: Command
|
Run the command up to `maxAttempts` times in total (initial run plus retries), waiting `delay` between attempts (`0`/`1` both mean a single run).
|
|
|
|
|
|
|
|
|
Full Usage:
Command.stderrLineTerminator terminator command
Parameters:
LineTerminator
command : Command
Returns: Command
|
Frame captured/streamed stderr lines with `terminator` (default `LineTerminator.Lf`).
|
|
|
|
|
|
|
|
|
Full Usage:
Command.stdoutLineTerminator terminator command
Parameters:
LineTerminator
command : Command
Returns: Command
|
Frame captured/streamed stdout lines with `terminator` (default `LineTerminator.Lf`).
|
|
|
Full Usage:
Command.streamBuffer policy command
Parameters:
StreamBufferPolicy
command : Command
Returns: Command
|
Opt in to a bounded/backpressure channel for the streaming verbs (default stays unbounded).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProcessKit API Reference