Versions in this module Expand all Collapse all v0 v0.29.1 Mar 5, 2022 Changes in this version + const EvtHeader + const EvtQuit + const EvtReadFin + const EvtReadNew + const EvtReady + const EvtSearchFin + const EvtSearchNew + const EvtSearchProgress + var EmptyMerger = NewMerger(nil, [][]Result{}, false, false) + func CountItems(cs []*Chunk) int + func PostProcessOptions(opts *Options) + func Run(opts *Options, version string, revision string) + type ByOrder []Offset + func (a ByOrder) Len() int + func (a ByOrder) Less(i, j int) bool + func (a ByOrder) Swap(i, j int) + type ByRelevance []Result + func (a ByRelevance) Len() int + func (a ByRelevance) Less(i, j int) bool + func (a ByRelevance) Swap(i, j int) + type ByRelevanceTac []Result + func (a ByRelevanceTac) Len() int + func (a ByRelevanceTac) Less(i, j int) bool + func (a ByRelevanceTac) Swap(i, j int) + type Case int + const CaseIgnore + const CaseRespect + const CaseSmart + type Chunk struct + func (c *Chunk) IsFull() bool + type ChunkCache struct + func NewChunkCache() ChunkCache + func (cc *ChunkCache) Add(chunk *Chunk, key string, list []Result) + func (cc *ChunkCache) Lookup(chunk *Chunk, key string) []Result + func (cc *ChunkCache) Search(chunk *Chunk, key string) []Result + type ChunkList struct + func NewChunkList(trans ItemBuilder) *ChunkList + func (cl *ChunkList) Clear() + func (cl *ChunkList) Push(data []byte) bool + func (cl *ChunkList) Snapshot() ([]*Chunk, int) + type Delimiter struct + func (d Delimiter) String() string + type History struct + func NewHistory(path string, maxSize int) (*History, error) + type Item struct + func (item *Item) AsString(stripAnsi bool) string + func (item *Item) Colors() []ansiOffset + func (item *Item) Index() int32 + func (item *Item) TrimLength() uint16 + type ItemBuilder func(*Item, []byte) bool + type MatchRequest struct + type Matcher struct + func NewMatcher(patternBuilder func([]rune) *Pattern, sort bool, tac bool, ...) *Matcher + func (m *Matcher) Loop() + func (m *Matcher) Reset(chunks []*Chunk, patternRunes []rune, cancel bool, final bool, sort bool, ...) + type Merger struct + func NewMerger(pattern *Pattern, lists [][]Result, sorted bool, tac bool) *Merger + func PassMerger(chunks *[]*Chunk, tac bool) *Merger + func (mg *Merger) Get(idx int) Result + func (mg *Merger) Length() int + type Offset [2]int32 + type Options struct + Ansi bool + Black bool + Bold bool + BorderShape tui.BorderShape + Case Case + ClearOnExit bool + Criteria []criterion + Cycle bool + Delimiter Delimiter + Exit0 bool + Expect map[tui.Event]string + Extended bool + FileWord bool + Filter *string + Fuzzy bool + FuzzyAlgo algo.Algo + Header []string + HeaderFirst bool + HeaderLines int + Height sizeSpec + History *History + Hscroll bool + HscrollOff int + InfoStyle infoStyle + JumpLabels string + KeepRight bool + Keymap map[tui.Event][]*action + Layout layoutType + Margin [4]sizeSpec + Marker string + MinHeight int + Mouse bool + Multi int + Normalize bool + Nth []Range + Padding [4]sizeSpec + Phony bool + Pointer string + Preview previewOpts + PrintQuery bool + PrintSep string + Printer func(string) + Prompt string + Query string + ReadZero bool + ScrollOff int + Select1 bool + Sort int + Sync bool + Tabstop int + Tac bool + Theme *tui.ColorTheme + ToggleSort bool + Unicode bool + Version bool + WithNth []Range + func ParseOptions() *Options + func ParseOptionsCobra() *Options + type Pattern struct + func BuildPattern(fuzzy bool, fuzzyAlgo algo.Algo, extended bool, caseMode Case, normalize bool, ...) *Pattern + func (p *Pattern) AsString() string + func (p *Pattern) CacheKey() string + func (p *Pattern) IsEmpty() bool + func (p *Pattern) Match(chunk *Chunk, slab *util.Slab) []Result + func (p *Pattern) MatchItem(item *Item, withPos bool, slab *util.Slab) (*Result, []Offset, *[]int) + type Range struct + func ParseRange(str *string) (Range, bool) + type Reader struct + func NewReader(pusher func([]byte) bool, eventBox *util.EventBox, delimNil bool, wait bool) *Reader + func (r *Reader) ReadSource() + type Result struct + func (result *Result) Index() int32 + type Terminal struct + func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal + func (t *Terminal) Input() (bool, []rune) + func (t *Terminal) Loop() + func (t *Terminal) UpdateCount(cnt int, final bool, failedCommand *string) + func (t *Terminal) UpdateHeader(header []string) + func (t *Terminal) UpdateList(merger *Merger, reset bool) + func (t *Terminal) UpdateProgress(progress float32) + type Token struct + func Tokenize(text string, delimiter Delimiter) []Token + func Transform(tokens []Token, withNth []Range) []Token + func (t Token) String() string