Documentation
¶
Overview ¶
Package shell runs (sh) task bodies through the pure-Go mvdan/sh interpreter. It NEVER shells out to the system shell (Principle V), so default-task behavior is identical across Linux, macOS, and Windows. Body lines run on a single persistent Runner so cd and exported variables carry across lines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecError ¶
ExecError reports a body-line failure: the task, the offending line, and the underlying exit code (or shell error).
type Options ¶
type Options struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Dir string // working directory ("" => current)
Env []string // KEY=VALUE pairs (nil => inherit os.Environ)
Quiet bool // suppress command echo
// EchoStyle, if non-nil, wraps each echoed command line for display (e.g.
// dimming). It is applied only AFTER the NoEcho/Quiet suppression check, so
// it never causes a suppressed line to appear, and must add only zero-width
// styling without altering the line's text.
EchoStyle func(string) string
}
Options configures a shell run.
Click to show internal directories.
Click to hide internal directories.