Documentation ¶
Overview ¶
Package zshell use a simple way to execute shell commands
Index ¶
- Variables
- func BgRun(command string) (err error)
- func BgRunContext(ctx context.Context, command string) (err error)
- func CallbackRun(command string, callback func(out string, isBasic bool)) (<-chan int, func(string), error)
- func CallbackRunContext(ctx context.Context, command string, callback func(str string, isStdout bool), ...) (<-chan int, func(string), error)
- func ExecCommand(ctx context.Context, command []string, stdIn io.Reader, stdOut io.Writer, ...) (code int, outStr, errStr string, err error)
- func ExecCommandHandle(ctx context.Context, command []string, bef func(cmd *exec.Cmd) error, ...) (code int, err error)
- func OutRun(command string, stdIn io.Reader, stdOut io.Writer, stdErr io.Writer) (code int, outStr, errStr string, err error)
- func PipeExecCommand(ctx context.Context, commands [][]string) (code int, outStr, errStr string, err error)
- func Run(command string) (code int, outStr, errStr string, err error)
- func RunBash(ctx context.Context, command string) (code int, outStr, errStr string, err error)
- func RunContext(ctx context.Context, command string) (code int, outStr, errStr string, err error)
- func RunNewProcess(file string, args []string) (pid int, err error)
- type Options
- type ShellBuffer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug = false Env []string Dir string )
Functions ¶
func BgRunContext ¶ added in v1.6.3
func CallbackRun ¶ added in v1.6.3
func CallbackRunContext ¶ added in v1.6.3
func ExecCommand ¶ added in v0.1.29
func ExecCommandHandle ¶ added in v0.1.64
func PipeExecCommand ¶ added in v0.1.64
func RunContext ¶ added in v0.1.44
Types ¶
type ShellBuffer ¶ added in v0.1.31
type ShellBuffer struct {
// contains filtered or unexported fields
}
func (*ShellBuffer) String ¶ added in v0.1.31
func (s *ShellBuffer) String() string
Click to show internal directories.
Click to hide internal directories.