Documentation
¶
Overview ¶
Package term contains a terminal implementation which can control Rufs trees.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeTerm ¶
type TreeTerm struct {
// contains filtered or unexported fields
}
TreeTerm models a command processor for Rufs trees.
func NewTreeTerm ¶
NewTreeTerm returns a new command processor for Rufs trees.
func (*TreeTerm) AddCmd ¶
func (tt *TreeTerm) AddCmd(cmd, helpusage, help string, cmdFunc func(*TreeTerm, ...string) (string, error))
AddCmd adds a new command to the terminal
func (*TreeTerm) ClearStatus ¶
func (tt *TreeTerm) ClearStatus()
ClearStatus removes the last status line and returns the cursor to the initial position.
func (*TreeTerm) CurrentDir ¶
CurrentDir returns the current directory of this TreeTerm.
func (*TreeTerm) Run ¶
Run executes a given command line. And return its output as a string. File output and other streams to the console are written to the output writer.
func (*TreeTerm) WriteStatus ¶
WriteStatus writes a status line to the output writer.
Click to show internal directories.
Click to hide internal directories.