Documentation ¶
Index ¶
- Constants
- func AppendCommand(parentCmd *Cmd, text, desc string)
- func AppendOpt(text, cmd, desc string, arg structarg.Argument)
- func AppendPos(text, cmd, desc string, arg structarg.Argument)
- func Completer(d prompt.Document) []prompt.Suggest
- func ExecuteAndGetResult(s string) (string, error)
- func Executor(s string)
- func GenerateAutoCompleteCmds(rootCmd *Cmd, shell string) string
- func InitEnv(_parser *structarg.ArgumentParser, _session *mcclient.ClientSession)
- type Cmd
- func (c *Cmd) AddCmd(cmd *Cmd)
- func (c *Cmd) AddOptArgument(arg structarg.Argument, argStr string, desc string)
- func (c *Cmd) AddPosArgument(arg structarg.Argument, argStr string, desc string)
- func (c *Cmd) GenZshCompletion(w io.Writer) error
- func (c Cmd) GetArguments() []structarg.Argument
- func (c Cmd) GetName() string
- func (c Cmd) GetOptArguments() []structarg.Argument
- func (c Cmd) GetPosArguments() []structarg.Argument
- func (c Cmd) GetPromptOptSuggests() []prompt.Suggest
- func (c Cmd) GetPromptPosSuggests() []prompt.Suggest
- func (c *Cmd) Root() *Cmd
- type CmdArgument
Constants ¶
View Source
const BASH_COMPLETE_SCRIPT_1 = `` /* 238-byte string literal not displayed */
View Source
const BASH_COMPLETE_SCRIPT_2 = `` /* 615-byte string literal not displayed */
View Source
const ZSH_COMPLETE_SCRIPT_1 = `` /* 205-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AppendCommand ¶
func ExecuteAndGetResult ¶
func InitEnv ¶
func InitEnv(_parser *structarg.ArgumentParser, _session *mcclient.ClientSession)
Types ¶
type Cmd ¶
type Cmd struct { Name string Desc string ParentCmd *Cmd SubCmds []*Cmd // contains filtered or unexported fields }
func GetRootCmd ¶
func GetRootCmd() *Cmd
func (*Cmd) AddOptArgument ¶
func (*Cmd) AddPosArgument ¶
func (Cmd) GetArguments ¶
func (Cmd) GetOptArguments ¶
func (Cmd) GetPosArguments ¶
func (Cmd) GetPromptOptSuggests ¶
func (Cmd) GetPromptPosSuggests ¶
Click to show internal directories.
Click to hide internal directories.