Documentation ¶
Index ¶
- Variables
- func Critical(err string)
- func Warning(warn string)
- type CommandFunction
- type Shell
- func (s *Shell) AddHistory(cmd string)
- func (s *Shell) Alias(args []string)
- func (s *Shell) Cd(args []string)
- func (s *Shell) EnsurePaths()
- func (s *Shell) Exit(args []string)
- func (s *Shell) Export(args []string)
- func (s *Shell) Getwd()
- func (s *Shell) Help(args []string)
- func (s *Shell) InitBuiltins()
- func (s *Shell) InitPath()
- func (s *Shell) RegisterCommand(key string, value func([]string)) *Shell
- func (s *Shell) StartRepl()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Aliases map[string]string DefaultPrompt string )
Functions ¶
Types ¶
type Shell ¶
type Shell struct { HistoryPath string RcPath string PathFiles []string BuiltinCommands map[string]CommandFunction WdFiles []string ExitCode int }
func (*Shell) AddHistory ¶ added in v0.2.0
func (*Shell) EnsurePaths ¶
func (s *Shell) EnsurePaths()
Creates if the history and .midorirc file does not exist.
func (*Shell) Getwd ¶ added in v0.2.0
func (s *Shell) Getwd()
Retrieves the directory where the shell is currently running. It then takes the files inside and puts them in s.WdFiles.
func (*Shell) InitBuiltins ¶
func (s *Shell) InitBuiltins()
func (*Shell) InitPath ¶
func (s *Shell) InitPath()
Save files to RAM to prevent Shell from reading the whole PATH variable on EVERY CHARACTER RECEIVED.
func (*Shell) RegisterCommand ¶
Click to show internal directories.
Click to hide internal directories.