Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command interface {
// Starts and wait for completion
Run() RunError
// Starts but don't wait for completion. Useful when changing command output to something other than stdout,
// using Customize() on builder.
// `exec.Cmd` is returned to call Wait() on it - but there is no need to call it, if you read the output to
// the EOF (in most cases EOF means the process ended)
Start() (*exec.Cmd, RunError)
}
type CommandBuilder ¶
type CommandBuilder interface {
Cmd(cmd string, args ...string) Command
// the higher the confirmation level, the less likely user will be asked to confirm
ConfirmationLevel(level int) CommandBuilder
}
type Shell ¶
type Shell interface {
Cmd(cmd string, args ...string) Command
CmdBuilder() CommandBuilder
Run(cmd string, args ...string) RunError
// show confirmation prompt and wait for user input
Confirm() error
}
func NewCustom ¶
func NewCustom(modify func(config *ShellConfig)) Shell
type ShellConfig ¶
Click to show internal directories.
Click to hide internal directories.