Versions in this module Expand all Collapse all v0 v0.1.0 Oct 5, 2026 Changes in this version + func RegisterBuiltin(c Command) + type AliasTable interface + All func() map[string]string + Clear func() + Get func(name string) (string, bool) + Names func() []string + Set func(name, value string) + Unset func(name string) bool + type Command interface + Execute func(ctx context.Context, args []string, c *Context) Result + Name func() Name + Trusted func() bool + func DefaultBuiltins() []Command + func Define(name string, fn func(ctx context.Context, args []string, c *Context) Result) Command + type Context struct + Aliases AliasTable + Cwd string + Env map[string]string + Exec SubExecFunc + ExportedEnv map[string]string + FS gbfs.FileSystem + Fetch network.Doer + History HistoryRing + Limits Limits + Registry *Registry + Shopt ShoptTable + Sleep SleepFunc + SourceDepth int + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + Trace TraceFunc + type HistoryRing interface + Add func(cmd string) + Clear func() + Len func() int + List func() (seqs []int, cmds []string) + type InvokeToolFunc = func(ctx context.Context, path, argsJSON string) (string, error) + type Limits struct + MaxArrayElements int + MaxAwkIterations int + MaxBraceExpansionResults int + MaxCallDepth int + MaxCommandCount int + MaxFileDescriptors int + MaxFileSystemBytes int + MaxGlobOperations int + MaxHeredocSize int + MaxInputSize int + MaxJqIterations int + MaxJsTimeout time.Duration + MaxLoopIterations int + MaxOutputSize int + MaxPythonTimeout time.Duration + MaxSedIterations int + MaxSourceDepth int + MaxSqliteTimeout time.Duration + MaxStringLength int + MaxSubstitutionDepth int + type Name string + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Has(name string) bool + func (r *Registry) Lookup(name string) (Command, bool) + func (r *Registry) Names() []Name + func (r *Registry) Register(c Command) + type Result struct + ExitCode int + Stderr string + Stdout string + type ShoptTable interface + IsSet func(name string) bool + Names func() []string + Set func(name string, on bool) + type SleepFunc = func(ctx context.Context, d time.Duration) error + type SubExecFunc = func(ctx context.Context, script string, opts SubExecOptions) (Result, error) + type SubExecOptions struct + Args []string + Cwd string + Env map[string]string + ReplaceEnv bool + SourceDepth int + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + type TraceEvent struct + Category string + Details map[string]any + Duration time.Duration + Name string + type TraceFunc = func(TraceEvent)