bash

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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 PreprocessTypesetCommands

func PreprocessTypesetCommands(input string) string

func RunBashCommand

func RunBashCommand(ctx context.Context, runner *interp.Runner, command string) (string, string, error)

func RunBashCommandInSubShell

func RunBashCommandInSubShell(ctx context.Context, runner *interp.Runner, command string) (string, string, error)

func RunBashScriptFromFile

func RunBashScriptFromFile(ctx context.Context, runner *interp.Runner, filePath string) error

func RunBashScriptFromReader

func RunBashScriptFromReader(ctx context.Context, runner *interp.Runner, reader io.Reader, name string) error

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

func SetCdRunner(runner *interp.Runner)

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

func SetTypesetRunner(runner *interp.Runner)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL