mode_interface

package
v0.0.0-...-a7e7b69 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: MPL-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode interface {
	// Returns suggestions for your cli command based on the current prompt
	Completer(d prompt.Document) []prompt.Suggest
	// Handle the typed in prompt selection
	HandleSelection(currCmd Mode, selection string, args []string)
	// Defines a custom cli prompt prefixes
	CliPrefix() (string, bool)
	// The name of the mode, will be used as the string in mode change commands
	Name() string
	// Handle the command (this is so the mode can be used with exec mode)
	HandleCommand(args []string)
}

Interface for CLI Modes

Jump to

Keyboard shortcuts

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