Documentation
¶
Overview ¶
Package terminal provides enhanced terminal input handling
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InputReader ¶
type InputReader struct {
// contains filtered or unexported fields
}
InputReader provides enhanced terminal input with history and line editing
func NewInputReader ¶
func NewInputReader(prompt string) (*InputReader, error)
NewInputReader creates a new terminal input reader with the specified prompt
func (*InputReader) Close ¶
func (r *InputReader) Close() error
Close cleans up the readline instance
func (*InputReader) IsTerminal ¶
func (r *InputReader) IsTerminal() bool
IsTerminal returns true if input is from a terminal
func (*InputReader) ReadLine ¶
func (r *InputReader) ReadLine() (string, error)
ReadLine reads a line from the terminal with full line editing support
func (*InputReader) ReadMultiLine ¶
func (r *InputReader) ReadMultiLine() (string, error)
ReadMultiLine reads multiple lines until the user enters an empty line This is useful for entering longer messages or code snippets
func (*InputReader) SetPrompt ¶
func (r *InputReader) SetPrompt(prompt string)
SetPrompt updates the prompt string
Click to show internal directories.
Click to hide internal directories.