Hint is in charge of printing the usage messages below the input line.
Various other UI components have access to it so that they can feed
specialized usage messages to it, like completions. Len returns the length of the current hint.
This is generally used by consumers to know if there already
is an active hint, in which case they might want to append to
it instead of overwriting it altogether (like in isearch mode). Persist adds a hint message to be persistently
displayed until hint.ResetPersist() is called. Reset removes the hint message. ResetPersist drops the persistent hint section. Set sets the hint message to the given text.
Generally, this hint message will persist until either a command
or the completion system overwrites it, or if hint.Reset() is called. SetTemporary sets a hint message that will be cleared at the next keypress
or command being run, which generally coincides with the next redisplay. Text returns the current hint text.
func CoordinatesHint(hint *Hint) int
func DisplayHint(hint *Hint)
func github.com/reeflective/readline/internal/completion.NewEngine(h *Hint, km *keymap.Engine, o *inputrc.Config) *completion.Engine
func github.com/reeflective/readline/internal/display.NewEngine(k *core.Keys, s *core.Selection, h *history.Sources, p *Prompt, i *Hint, c *completion.Engine, opts *inputrc.Config) *display.Engine
func github.com/reeflective/readline/internal/history.NewSources(line *core.Line, cur *core.Cursor, hint *Hint, opts *inputrc.Config) *history.Sources
func github.com/reeflective/readline/internal/macro.NewEngine(keys *core.Keys, hint *Hint) *macro.Engine
Prompt stores all prompt rendering/generation functions and is
in charge of displaying them, as well as computing their offsets. LastPrint prints the last line of the primary prompt, if the latter
spans on several lines. If not, this function will actually print
the entire primary prompt, and PrimaryPrint() will not print anything. LastUsed returns the number of terminal columns used by the last
part of the primary prompt (of the entire string if not multiline).
This, in effect, returns the X coordinate at which the input line
should be printed, and indentation for subsequent lines if several. MultilineColumnPrint prints the multiline editor column status indicator.
It either prints a default, numbered or user-defined column. Primary uses a function returning the string to use as the primary prompt. PrimaryPrint prints the primary prompt string, excluding
the last line if the primary prompt spans on several lines. PrimaryUsed returns the number of terminal rows on which
the primary prompt string spans, excluding the last line
if it contains newlines. Refreshing returns true if the prompt is currently redisplaying
itself (at least the primary prompt), or false if not. Right uses a function returning the string to use as the right prompt. RightPrint prints the right-sided prompt strings, which might be either
a traditional RPROMPT string, or a tooltip prompt if any must be rendered.
If force is true, whatever rprompt or tooltip exists will be printed.
If false, only the rprompt, if it exists, will be printed. Secondary uses a function returning the prompt to use as the secondary prompt. SecondaryPrint prints the last cursor in secondary prompt mode,
which is always activated when the current input line is a multiline one. Tooltip uses a function returning the prompt to use as a tooltip prompt. Transient uses a function returning the prompt to use as a transient prompt. TransientPrint prints the transient prompt.
func NewPrompt(line *core.Line, cursor *core.Cursor, keymaps *keymap.Engine, opts *inputrc.Config) *Prompt
func github.com/reeflective/readline/internal/display.NewEngine(k *core.Keys, s *core.Selection, h *history.Sources, p *Prompt, i *Hint, c *completion.Engine, opts *inputrc.Config) *display.Engine
Package-Level Functions (total 3)
CoordinatesHint returns the number of terminal rows used by the hint.
DisplayHint prints the hint (persistent and/or temporary) sections.
NewPrompt is a required constructor to initialize the prompt system.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.