bellskipper

package
v2.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BellSkipper

type BellSkipper struct {
	// contains filtered or unexported fields
}

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 NewBellSkipper

func NewBellSkipper(w io.WriteCloser) *BellSkipper

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