Documentation ¶
Index ¶
- Constants
- Variables
- func Choice(sources []string, out io.Writer) string
- func ChoiceMulti(sources []string, out io.Writer) []string
- func Choose(sources []string, out io.Writer) int
- func ChooseMulti(sources []string, out io.Writer) []int
- func New() *box_t
- func Print(ctx context.Context, nodes []string, out io.Writer) bool
Constants ¶
View Source
const ( CURSOR_OFF = "\x1B[?25l" CURSOR_ON = "\x1B[?25h" BOLD_ON = "\x1B[0;47;30m" BOLD_ON2 = "\x1B[0;1;7m" BOLD_OFF = "\x1B[0m" UP_N = "\x1B[%dA" ERASE_LINE = "\x1B[0K" )
View Source
const ( NONE = 0 LEFT = 1 DOWN = 2 UP = 3 RIGHT = 4 ENTER = 5 LEAVE = 6 SELECT_DOWN = 7 SELECT_UP = 8 SELECT_LEFT = 9 SELECT_RIGHT = 10 )
View Source
const ( K_LEFT = "\x1B[D" K_UP = "\x1B[A" K_RIGHT = "\x1B[C" K_DOWN = "\x1B[B" K_CTRL_F = "\x06" K_CTRL_B = "\x02" K_CTRL_N = "\x0E" K_CTRL_P = "\x10" K_CTRL_G = "\x07" K_CTRL_DOWN = "\x1B[1;5B" K_CTRL_LEFT = "\x1B[1;5D" K_CTRL_RIGHT = "\x1B[1;5C" K_CTRL_UP = "\x1B[1;5A" )
Variables ¶
View Source
var AnsiCutter = regexp.MustCompile("\x1B[^a-zA-Z]*[A-Za-z]")
Functions ¶
func ChooseMulti ¶ added in v2.0.5
Choice returns the index of selected string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.