shell

package
v0.0.0-...-3d7ce53 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = "modd"
View Source
var ValidShells = map[string]bool{
	"bash":       true,
	"modd":       true,
	"powershell": true,
	"sh":         true,
}

Functions

func CheckShell

func CheckShell(shell string) (string, error)

CheckShell checks that a shell is supported, and returns the correct command name

func GetShellName

func GetShellName(v string) (string, error)

Types

type ExecState

type ExecState struct {
	Error     error
	ErrOutput string
	ProcState string
}

type Executor

type Executor struct {
	Shell   string
	Command string
	Dir     string

	sync.Mutex
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(shell string, command string, dir string) (*Executor, error)

func (*Executor) Run

func (e *Executor) Run(log termlog.Stream, bufferr bool) (error, *ExecState)

func (*Executor) Running

func (e *Executor) Running() bool

func (*Executor) Signal

func (e *Executor) Signal(sig os.Signal) error

func (*Executor) Stop

func (e *Executor) Stop(sig os.Signal) error

Jump to

Keyboard shortcuts

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