Documentation ¶
Index ¶
- Variables
- func InputAmount(pr string) (types.Amount, bool)
- func InputFilename(pr string, rootPath string, mustExit bool) (string, error)
- func InputIntWithDefault(pr string, def int) (int, bool)
- func InputMultiChoice(pr string, def string, choices []prompt.Suggest, ...) (string, bool)
- func InputSandboxedFilename(pr string, rootPath string, mustExist bool) (string, error)
- func InputText(pr string) string
- func InputTextWithDefault(pr, def string) string
- func InputYesNo(pr string, def bool) (bool, bool)
- type MenuCompleter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UpCommand = &MenuCompleter{ Suggestion: &prompt.Suggest{ Text: "..", Description: "move to the Parent menu", }, } HelpCommand = &MenuCompleter{ Suggestion: &prompt.Suggest{ Text: "help", Description: "show the help for the current menu", }, } ExitCommand = &MenuCompleter{ Suggestion: &prompt.Suggest{ Text: "exit", Description: "exit the interactive console", }, } TailCommands = []*MenuCompleter{UpCommand, HelpCommand, ExitCommand} )
Functions ¶
func InputMultiChoice ¶
func InputSandboxedFilename ¶
func InputTextWithDefault ¶
Types ¶
type MenuCompleter ¶
type MenuCompleter struct { Suggestion *prompt.Suggest Sub []*MenuCompleter Parent *MenuCompleter }
func NewMenuCompleter ¶
func NewMenuCompleter(cmd *cobra.Command, parent *MenuCompleter) *MenuCompleter
func NewRootNode ¶
func NewRootNode(entries []*MenuCompleter) *MenuCompleter
func (*MenuCompleter) Completer ¶
func (cc *MenuCompleter) Completer(doc prompt.Document) []prompt.Suggest
func (*MenuCompleter) Name ¶
func (cc *MenuCompleter) Name() string
func (*MenuCompleter) Prompt ¶
func (cc *MenuCompleter) Prompt(p string) string
Click to show internal directories.
Click to hide internal directories.