Versions in this module Expand all Collapse all v1 v1.0.6 Dec 17, 2025 v1.0.5 Dec 15, 2025 v1.0.4 Dec 11, 2025 v1.0.3 Dec 5, 2025 v1.0.2 Nov 25, 2025 v1.0.1 Nov 20, 2025 v1.0.0 Nov 5, 2025 v0 v0.1.46 Oct 24, 2025 v0.1.45 Oct 17, 2025 Changes in this version + const CharBackspace + const CharBackward + const CharBckSearch + const CharBell + const CharBracketedPaste + const CharBracketedPasteEnd + const CharBracketedPasteStart + const CharCtrlH + const CharCtrlJ + const CharCtrlL + const CharCtrlU + const CharCtrlW + const CharCtrlY + const CharCtrlZ + const CharDelete + const CharEnter + const CharEsc + const CharEscapeEx + const CharForward + const CharFwdSearch + const CharInterrupt + const CharKill + const CharLineEnd + const CharLineStart + const CharNext + const CharNull + const CharPrev + const CharSpace + const CharTab + const CharTranspose + const ClearLine + const ClearScreen + const ClearToEOL + const ColorBold + const ColorDefault + const ColorGrey + const CursorBOL + const CursorEOL + const CursorHide + const CursorReset + const CursorRestore + const CursorSave + const CursorShow + const EndBracketedPaste + const Esc + const KeyDel + const KeyDown + const KeyLeft + const KeyRight + const KeyUp + const MetaEnd + const MetaStart + const StartBracketedPaste + var CursorDown = CursorDownN(1) + var CursorLeft = CursorLeftN(1) + var CursorRight = CursorRightN(1) + var CursorUp = CursorUpN(1) + var ErrInterrupt = errors.New("Interrupt") + func CursorDownN(n int) string + func CursorLeftN(n int) string + func CursorRightN(n int) string + func CursorUpN(n int) string + func IsTerminal(fd uintptr) bool — darwin/amd64, linux/amd64, windows/amd64 + func UnsetRawMode(fd uintptr, state any) error — windows/amd64 + func UnsetRawMode(fd uintptr, termios any) error — darwin/amd64, linux/amd64 + type Buffer struct + Buf *arraylist.List[rune] + DisplayPos int + Height int + LineHasSpace *arraylist.List[bool] + LineWidth int + Pos int + Prompt *Prompt + Width int + func NewBuffer(prompt *Prompt) (*Buffer, error) + func (b *Buffer) Add(r rune) + func (b *Buffer) AddChar(r rune, insert bool) + func (b *Buffer) ClearScreen() + func (b *Buffer) Delete() + func (b *Buffer) DeleteBefore() + func (b *Buffer) DeleteRemaining() + func (b *Buffer) DeleteWord() + func (b *Buffer) DisplaySize() int + func (b *Buffer) GetLineSpacing(line int) bool + func (b *Buffer) IsEmpty() bool + func (b *Buffer) MoveLeft() + func (b *Buffer) MoveLeftWord() + func (b *Buffer) MoveRight() + func (b *Buffer) MoveRightWord() + func (b *Buffer) MoveToEnd() + func (b *Buffer) MoveToStart() + func (b *Buffer) Remove() + func (b *Buffer) Replace(r []rune) + func (b *Buffer) String() string + func (b *Buffer) StringN(n int) string + func (b *Buffer) StringNM(n, m int) string + type History struct + Autosave bool + Buf *arraylist.List[string] + Enabled bool + Filename string + Limit int + Pos int + func NewHistory() (*History, error) + func (h *History) Add(s string) + func (h *History) Clear() + func (h *History) Compact() + func (h *History) Init() error + func (h *History) Next() (line string) + func (h *History) Prev() (line string) + func (h *History) Save() error + func (h *History) Size() int + type Instance struct + History *History + Pasting bool + Prompt *Prompt + Terminal *Terminal + func New(prompt Prompt) (*Instance, error) + func (i *Instance) HistoryDisable() + func (i *Instance) HistoryEnable() + func (i *Instance) Readline() (string, error) + type InterruptError struct + Line []rune + func (*InterruptError) Error() string + type Prompt struct + AltPlaceholder string + AltPrompt string + Placeholder string + Prompt string + UseAlt bool + type State struct — windows/amd64 + func SetRawMode(fd uintptr) (*State, error) + type Terminal struct + func NewTerminal() (*Terminal, error) + func (t *Terminal) Read() (rune, error) + type Termios syscall.Termios — darwin/amd64, linux/amd64 + func SetRawMode(fd uintptr) (*Termios, error)