Documentation ¶
Overview ¶
Package sh to run command programing
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// DefaultRunner use to execute with package
DefaultRunner, _ = New()
)
var Dir = interp.Dir
Dir sets the interpreter's working directory. If empty, the process's current directory is used.
var Env = interp.Env
Env sets the interpreter's environment. If nil, a copy of the current process's environment is used.
var Params = interp.Params
Params populates the shell options and parameters. For example, Params("-e", "--", "foo") will set the "-e" option and the parameters ["foo"], and Params("+e") will unset the "-e" option and leave the parameters untouched.
This is similar to what the interpreter's "set" builtin does.
var StdIO = interp.StdIO
StdIO configures an interpreter's standard input, standard output, and standard error. If out or err are nil, they default to a writer that discards the output.