Documentation
¶
Index ¶
- func ComputeCursorCol(data []byte) int
- func RecordSessionCommand(cmd string)
- type HistResult
- type Overlay
- func (o *Overlay) Clear() string
- func (o *Overlay) ClearAndDisable() string
- func (o *Overlay) ClearGhostLen() int
- func (o *Overlay) ClearGhostTextState()
- func (o *Overlay) GetCurrentCmd() string
- func (o *Overlay) GetGhostText(buffer string, cursorAtEnd bool) string
- func (o *Overlay) GetTopCmd() string
- func (o *Overlay) GetTypedQuery() string
- func (o *Overlay) GetUserNavigated() bool
- func (o *Overlay) HideGhostTextSync() string
- func (o *Overlay) HideMenu(query string) string
- func (o *Overlay) InjectAISuggestion(sugg spec.Suggestion) bool
- func (o *Overlay) IsVisible() bool
- func (o *Overlay) MoveCursor(dir string) (moved bool, selectedCmd string)
- func (o *Overlay) Render() string
- func (o *Overlay) RenderGhostText(buffer string, userNavigated bool, cursorAtEnd bool) string
- func (o *Overlay) ResetCursor()
- func (o *Overlay) SetCursorAtEnd(v bool)
- func (o *Overlay) SetHistoryList(items []spec.Suggestion, startAtBottom bool) string
- func (o *Overlay) SetPromptLen(l int)
- func (o *Overlay) SetQueryAndItems(query string, items []spec.Suggestion)
- func (o *Overlay) SetScreenLine(q string)
- func (o *Overlay) SetSelection(q string)
- func (o *Overlay) SetTypedQuery(q string)
- func (o *Overlay) SetUserNavigated(v bool)
- func (o *Overlay) Show()
- func (o *Overlay) UpdateItems(items []spec.Suggestion)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCursorCol ¶ added in v0.2.0
func RecordSessionCommand ¶ added in v0.4.0
func RecordSessionCommand(cmd string)
Types ¶
type HistResult ¶
func SearchHistory ¶
func SearchHistory(query string, aliases map[string]string) ([]HistResult, error)
type Overlay ¶
type Overlay struct {
Visible bool
Items []spec.Suggestion
Cursor int
StartIdx int
LastGhostLen int
TypedQuery string
PromptLen int
// CursorAtEnd gates the erase that follows the input onto a new wrapped
// row: it walks to the end-of-text column, which is only where the cursor
// really is when nothing has moved it left.
CursorAtEnd bool
// ScreenLine is what iris believes the shell is currently displaying. It
// trails TypedQuery while a rewrite is held back during navigation, and the
// box is placed against this, not against the entry being highlighted.
ScreenLine string
// contains filtered or unexported fields
}
func NewOverlay ¶
func NewOverlay() *Overlay
func (*Overlay) ClearAndDisable ¶
func (*Overlay) ClearGhostLen ¶ added in v0.2.0
func (*Overlay) ClearGhostTextState ¶ added in v0.4.6
func (o *Overlay) ClearGhostTextState()
func (*Overlay) GetCurrentCmd ¶ added in v0.2.0
func (*Overlay) GetGhostText ¶ added in v0.3.0
func (*Overlay) GetTypedQuery ¶ added in v0.2.0
func (*Overlay) GetUserNavigated ¶ added in v0.2.0
func (*Overlay) HideGhostTextSync ¶ added in v0.4.6
func (*Overlay) InjectAISuggestion ¶ added in v0.3.0
func (o *Overlay) InjectAISuggestion(sugg spec.Suggestion) bool
func (*Overlay) MoveCursor ¶ added in v0.2.0
func (*Overlay) RenderGhostText ¶
func (*Overlay) ResetCursor ¶ added in v0.2.0
func (o *Overlay) ResetCursor()
func (*Overlay) SetCursorAtEnd ¶ added in v0.7.0
func (*Overlay) SetHistoryList ¶ added in v0.2.0
func (o *Overlay) SetHistoryList(items []spec.Suggestion, startAtBottom bool) string
func (*Overlay) SetPromptLen ¶ added in v0.2.0
func (*Overlay) SetQueryAndItems ¶ added in v0.2.0
func (o *Overlay) SetQueryAndItems(query string, items []spec.Suggestion)
func (*Overlay) SetScreenLine ¶ added in v0.7.0
SetScreenLine records that the shell's line now holds q.
func (*Overlay) SetSelection ¶ added in v0.7.0
SetSelection updates the highlighted entry without claiming the shell has redrawn its line yet.
func (*Overlay) SetTypedQuery ¶ added in v0.7.0
func (*Overlay) SetUserNavigated ¶ added in v0.2.0
func (*Overlay) UpdateItems ¶
func (o *Overlay) UpdateItems(items []spec.Suggestion)
Click to show internal directories.
Click to hide internal directories.