integration

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: 0BSD Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeCursorCol added in v0.2.0

func ComputeCursorCol(data []byte) int

func RecordSessionCommand added in v0.4.0

func RecordSessionCommand(cmd string)

Types

type HistResult

type HistResult struct {
	ID         int
	Cmd        string
	FuzzyScore int
	Source     string
}

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
	UserNavigated bool
	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) Clear

func (o *Overlay) Clear() string

func (*Overlay) ClearAndDisable

func (o *Overlay) ClearAndDisable() string

func (*Overlay) ClearGhostLen added in v0.2.0

func (o *Overlay) ClearGhostLen() int

func (*Overlay) ClearGhostTextState added in v0.4.6

func (o *Overlay) ClearGhostTextState()

func (*Overlay) GetCurrentCmd added in v0.2.0

func (o *Overlay) GetCurrentCmd() string

func (*Overlay) GetGhostText added in v0.3.0

func (o *Overlay) GetGhostText(buffer string, cursorAtEnd bool) string

func (*Overlay) GetTopCmd added in v0.2.0

func (o *Overlay) GetTopCmd() string

func (*Overlay) GetTypedQuery added in v0.2.0

func (o *Overlay) GetTypedQuery() string

func (*Overlay) GetUserNavigated added in v0.2.0

func (o *Overlay) GetUserNavigated() bool

func (*Overlay) HideGhostTextSync added in v0.4.6

func (o *Overlay) HideGhostTextSync() string

func (*Overlay) HideMenu added in v0.3.0

func (o *Overlay) HideMenu(query string) string

func (*Overlay) InjectAISuggestion added in v0.3.0

func (o *Overlay) InjectAISuggestion(sugg spec.Suggestion) bool

func (*Overlay) IsVisible added in v0.2.0

func (o *Overlay) IsVisible() bool

func (*Overlay) MoveCursor added in v0.2.0

func (o *Overlay) MoveCursor(dir string) (moved bool, selectedCmd string)

func (*Overlay) Render

func (o *Overlay) Render() string

func (*Overlay) RenderGhostText

func (o *Overlay) RenderGhostText(buffer string, userNavigated bool, cursorAtEnd bool) string

func (*Overlay) ResetCursor added in v0.2.0

func (o *Overlay) ResetCursor()

func (*Overlay) SetCursorAtEnd added in v0.7.0

func (o *Overlay) SetCursorAtEnd(v bool)

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 (o *Overlay) SetPromptLen(l int)

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

func (o *Overlay) SetScreenLine(q string)

SetScreenLine records that the shell's line now holds q.

func (*Overlay) SetSelection added in v0.7.0

func (o *Overlay) SetSelection(q string)

SetSelection updates the highlighted entry without claiming the shell has redrawn its line yet.

func (*Overlay) SetTypedQuery added in v0.7.0

func (o *Overlay) SetTypedQuery(q string)

func (*Overlay) SetUserNavigated added in v0.2.0

func (o *Overlay) SetUserNavigated(v bool)

func (*Overlay) Show added in v0.2.0

func (o *Overlay) Show()

func (*Overlay) UpdateItems

func (o *Overlay) UpdateItems(items []spec.Suggestion)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL