prompter

package
v0.0.0-...-2dd510e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LivePrefixState

type LivePrefixState struct {
	LivePrefix string
	IsEnable   bool
}

LivePrefixState represent the prompt.

type Prompter

type Prompter struct {
	NSH         *syntax.NSHandler
	NSM         *syntax.NSManager
	NS          *syntax.NameSpace
	PrefixState *LivePrefixState
	// contains filtered or unexported fields
}

Prompter represents the CLI propmpt.

func NewPrompter

func NewPrompter() *Prompter

NewPrompter creates a new Prompter instance.

func (*Prompter) Run

func (pr *Prompter) Run()

Run runs the prompt.

func (*Prompter) Setup

func (pr *Prompter) Setup(nsname string, commands ...*syntax.Command) error

Setup initializes the prompter with the given commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL