Documentation
¶
Overview ¶
Package exec wires together the parser, environment, filesystem map, builtins, and external command execution into a running shell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shell ¶
type Shell struct {
Env *env.Env
DriveMap *fsmap.DriveMap
Builtins *builtins.Registry
Config *config.Config
EchoOn bool
ErrorLevel int
DelayedExpansion bool
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// contains filtered or unexported fields
}
Shell is the central execution context.
func (*Shell) Completer ¶
Completer returns a liner-compatible tab-completion function.
Completion rules:
- First word: offer builtin names and executables found in PATH.
- Later word that looks like a DOS path: list matching filesystem entries.
func (*Shell) RunBatch ¶
RunBatch loads and executes a DOS batch file. dosPath may be a DOS-style path (C:\scripts\foo.bat) or a plain Unix path. args are the positional parameters %1..%9; dosPath becomes %0.
func (*Shell) RunBatchContent ¶
RunBatchContent executes batch content supplied as raw bytes (e.g. from stdin). name is used only for diagnostics.
Click to show internal directories.
Click to hide internal directories.