bash

package
v0.0.0-...-886ad8c Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bash provides simple interface to a shell session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session represents a single Bash session. Any environment change are preserved across multiple commands.

func NewSession

func NewSession(w io.Writer) (*Session, error)

NewSession initiates new bash session. It sources user's default .bashrc file.

func (*Session) Close

func (s *Session) Close() error

Close terminates the session. It waits for the session to cleanup. The function returns the last error encountered during the session, if any.

func (*Session) Start

func (s *Session) Start(cmd string)

Start runs a single line in the bash session. The execution is asynchronous, it does not wait for the command to finish.

Jump to

Keyboard shortcuts

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