Versions in this module Expand all Collapse all v0 v0.3.0 Feb 19, 2026 v0.2.4 Oct 20, 2025 v0.2.3 Oct 7, 2025 v0.2.2 Jul 24, 2025 v0.2.1 Apr 12, 2025 v0.2.0 Apr 12, 2025 Changes in this version + func EnsureLineTermination(cmd string) string type Option + func AsPipeline() Option type Options + func (o *Options) AsPipeline() bool type Pipeline + func (p *Pipeline) Listen(ctx context.Context, opts ...Option) error type Runner + Send func(ctx context.Context, data []byte) (int, error) v0.1.0 Apr 7, 2025 Changes in this version + type Command struct + Error []string + Index int + Stdin string + Stdout []string + func NewCommand(command string, output string, err error) *Command + func (c *Command) Err() error + func (c *Command) Output() string + type History struct + Commands []*Command + func NewHistory() *History + type Listener func(stdout string, hasMore bool) + type Option func(*Options) + func WithEnvironment(env map[string]string) Option + func WithFlashIntervalMs(ts int) Option + func WithHistory(history *History) Option + func WithListener(listener Listener) Option + func WithPath(aPath string) Option + func WithRunner(runner Runner) Option + func WithShell(shell string) Option + func WithShellPrompt(shellPrompt string) Option + func WithSystemPaths(paths []string) Option + func WithTerminators(terminators []string) Option + func WithTimeout(timeoutMs int) Option + type Options struct + Cols int + Env map[string]string + History *History + Path string + Rows int + Runner Runner + Shell string + SystemPaths []string + Term string + func NewOptions(opts []Option) *Options + func (p *Options) Apply(options []Option) *Options + func (p *Options) Environ() []string + type Pipeline struct + func NewPipeline(ctx context.Context, in io.WriteCloser, stdout io.Reader, stderr io.Reader, ...) (*Pipeline, error) + func (p *Pipeline) Close() (err error) + func (p *Pipeline) Drain(ctx context.Context, opts ...Option) + func (p *Pipeline) Err() error + func (p *Pipeline) FormatCmd(cmd string) string + func (p *Pipeline) Read(ctx context.Context, opts ...Option) (output string, has bool, code int, err error) + func (p *Pipeline) Running() bool + type Runner interface + Close func() error + PID func() int + Run func(ctx context.Context, command string, options ...Option) (string, int, error) + Stdin func() io.Writer