cli

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessageInput

func MessageInput(label string, max int) string

MessageInput displays an input to type commit short message

func Select

func Select(label string, items []string) string

Select display a select promptui item

func YesNoSelect

func YesNoSelect(label string, negative bool) bool

YesNoSelect display a select promptui item Yes/No if negative = false, No/Yes if negative = true

Types

type BellSkipper

type BellSkipper struct{}

BellSkipper implements an io.WriteCloser that skips the terminal bell character (ASCII code 7), and writes the rest to os.Stderr. It is used to replace readline.Stdout, that is the package used by promptui to display the prompts.

This is a workaround for the bell issue documented in https://github.com/manifoldco/promptui/issues/49.

func (*BellSkipper) Close

func (bs *BellSkipper) Close() error

Close implements an io.WriterCloser over os.Stderr.

func (*BellSkipper) Write

func (bs *BellSkipper) Write(b []byte) (int, error)

Write implements an io.WriterCloser over os.Stderr, but it skips the terminal bell character.

Jump to

Keyboard shortcuts

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