Documentation
¶
Index ¶
- type DefaultFolder
- func (folder *DefaultFolder) AddCommand(command string, function func(string))
- func (folder *DefaultFolder) AddFolder(name string, subfolder Folder)
- func (folder *DefaultFolder) Ls(_ string)
- func (folder *DefaultFolder) Run()
- func (folder *DefaultFolder) RunWithTerm(prompt string, term *terminal.Terminal)
- type Folder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultFolder ¶
type DefaultFolder struct {
// contains filtered or unexported fields
}
DefaultFolder is a struct that holds data and methods for a command folder
func (*DefaultFolder) AddCommand ¶
func (folder *DefaultFolder) AddCommand(command string, function func(string))
AddCommand adds a function as a command to the folder
func (*DefaultFolder) AddFolder ¶
func (folder *DefaultFolder) AddFolder(name string, subfolder Folder)
AddFolder adds another folder instance as a child of the current folder
func (*DefaultFolder) Ls ¶
func (folder *DefaultFolder) Ls(_ string)
Ls is the default ls command function which lists the subfolders. It may be overridden.
func (*DefaultFolder) RunWithTerm ¶
func (folder *DefaultFolder) RunWithTerm(prompt string, term *terminal.Terminal)
RunWithTerm is used between folder instances to reuse the terminal object and prompt string
Click to show internal directories.
Click to hide internal directories.