Documentation
¶
Index ¶
- func NewCdCommandHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
- func NewTypesetCommandHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
- func PreprocessTypesetCommands(input string) string
- func RunBashCommand(ctx context.Context, runner *interp.Runner, command string) (string, string, error)
- func RunBashCommandInSubShell(ctx context.Context, runner *interp.Runner, command string) (string, string, error)
- func RunBashScriptFromFile(ctx context.Context, runner *interp.Runner, filePath string) error
- func RunBashScriptFromReader(ctx context.Context, runner *interp.Runner, reader io.Reader, name string) error
- func SetBuiltinHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
- func SetCdRunner(runner *interp.Runner)
- func SetTypesetRunner(runner *interp.Runner)
- func ShouldExitOnError() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCdCommandHandler ¶ added in v0.30.0
func NewCdCommandHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
NewCdCommandHandler creates a new ExecHandler middleware for the cd command
func NewTypesetCommandHandler ¶
func NewTypesetCommandHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
NewTypesetCommandHandler creates a new ExecHandler for the typeset and declare commands
func RunBashCommand ¶
func RunBashScriptFromFile ¶
func RunBashScriptFromReader ¶
func SetBuiltinHandler ¶
func SetBuiltinHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
SetBuiltinHandler handles the 'set' builtin command, supporting '-e' option
func SetCdRunner ¶ added in v0.30.0
SetCdRunner sets the global runner reference for the cd command handler. This enables the cd command to update both OS environment variables and the interpreter's internal PWD/OLDPWD variables for consistency.
func SetTypesetRunner ¶
SetTypesetRunner sets the global runner reference for the typeset command handler This function enables dependency injection for testing purposes, allowing tests to provide their own runner instances without modifying global application state.
func ShouldExitOnError ¶
func ShouldExitOnError() bool
ShouldExitOnError returns true if exit-on-error is currently enabled
Types ¶
This section is empty.