Documentation
¶
Index ¶
- Constants
- func ClearLine()
- func CloseProps()
- func ColorBlue()
- func ColorBold()
- func ColorBrGreen()
- func ColorCyan()
- func ColorGreen()
- func ColorMagenta()
- func ColorOrange()
- func ColorRed()
- func ColorWhite()
- func CurDown(n int)
- func CurLeft(n int)
- func CurRight(n int)
- func CurUp(n int)
- func DisplayBlock(bloc env.Block, idx *env.Idxs) (env.Object, bool)
- func DisplayDict(bloc env.Dict, idx *env.Idxs) (env.Object, bool)
- func DisplayInputField(right int, mlen int) (env.Object, bool)
- func DisplaySelection(bloc env.Block, idx *env.Idxs, right int) (env.Object, bool)
- func DisplaySpreadsheetRow(bloc env.SpreadsheetRow, idx *env.Idxs) (env.Object, bool)
- func DisplayTable(bloc env.Spreadsheet, idx *env.Idxs) (env.Object, bool)
- func GetChar() (ascii int, keyCode int, err error)
- func GetChar2() (letter string, ascii int, keyCode int, err error)
- func GetTerminalColumns() int
- func HideCur()
- func ResetBold()
- func RestoreCurPos()
- func RyeHighlight(s string, inStrX bool, columns int) (string, bool)
- func RyeHighlight_OLD1(s string, inStrX bool) (string, bool)
- func SaveCurPos()
- func ShowCur()
- type Completer
- type HighlightedStringBuilder
- type KeyEvent
- type MLState
- type WordCompleter
Constants ¶
const HistoryLimit = 1000
HistoryLimit is the maximum number of entries saved in the scrollback history.
Variables ¶
This section is empty.
Functions ¶
func CloseProps ¶
func CloseProps()
func ColorBrGreen ¶
func ColorBrGreen()
func ColorGreen ¶
func ColorGreen()
func ColorMagenta ¶
func ColorMagenta()
func ColorOrange ¶
func ColorOrange()
func ColorWhite ¶
func ColorWhite()
func DisplaySelection ¶
func DisplaySpreadsheetRow ¶
func DisplayTable ¶
func GetTerminalColumns ¶ added in v0.0.26
func GetTerminalColumns() int
func RestoreCurPos ¶
func RestoreCurPos()
func RyeHighlight ¶ added in v0.0.26
func RyeHighlight_OLD1 ¶ added in v0.0.26
func SaveCurPos ¶
func SaveCurPos()
Types ¶
type Completer ¶ added in v0.0.26
Completer takes the currently edited line content at the left of the cursor to the completer which may return {"Hello, world", "Hello, Word"} to have "Hello, world!!!".
type HighlightedStringBuilder ¶ added in v0.0.26
type HighlightedStringBuilder struct {
// contains filtered or unexported fields
}
func (*HighlightedStringBuilder) ColoredString ¶ added in v0.0.26
func (h *HighlightedStringBuilder) ColoredString(inStr bool) string
func (*HighlightedStringBuilder) Reset ¶ added in v0.0.26
func (h *HighlightedStringBuilder) Reset()
func (*HighlightedStringBuilder) String ¶ added in v0.0.26
func (h *HighlightedStringBuilder) String() string
func (*HighlightedStringBuilder) WriteRune ¶ added in v0.0.26
func (h *HighlightedStringBuilder) WriteRune(c rune)
type MLState ¶ added in v0.0.26
type MLState struct {
// contains filtered or unexported fields
}
State represents an open terminal
func NewMicroLiner ¶ added in v0.0.26
NewLiner initializes a new *State, and sets the terminal into raw mode. To restore the terminal to its previous state, call State.Close().
func (*MLState) AppendHistory ¶ added in v0.0.26
AppendHistory appends an entry to the scrollback history. AppendHistory should be called iff Prompt returns a valid command.
func (*MLState) ClearHistory ¶ added in v0.0.26
func (s *MLState) ClearHistory()
ClearHistory clears the scrollback history.
func (*MLState) MicroPrompt ¶ added in v0.0.26
func (s *MLState) MicroPrompt(prompt string, text string, pos int, ctx1 context.Context) (string, error)
signals end-of-file by pressing Ctrl-D.
func (*MLState) SetCompleter ¶ added in v0.0.26
SetCompleter sets the completion function that Liner will call to fetch completion candidates when the user presses tab.
type WordCompleter ¶ added in v0.0.26
type WordCompleter func(line string, pos int, mode int) (head string, completions []string, tail string)
WordCompleter takes the currently edited line with the cursor position and to the completer which may returns ("Hello, ", {"world", "Word"}, "!!!") to have "Hello, world!!!".