src.elv.shsrc.elv.sh/pkg/edit/filter Index | Files

package filter

import "src.elv.sh/pkg/edit/filter"

Package filter implements the Elvish filter DSL.

The filter DSL is a subset of Elvish's expression syntax, and is useful for filtering a list of items. It is currently used in the listing modes of the interactive editor.

Index

Functions

func Highlight

func Highlight(q string) (ui.Text, []ui.Text)

Types

type Filter

type Filter interface {
	Match(s string) bool
}

Filter represents a compiled filter, which can be used to match text.

func Compile

func Compile(q string) (Filter, error)

Compile parses and compiles a filter.

Source Files

compile.go filter.go highlight.go

Version
v0.21.0 (latest)
Published
Aug 13, 2024
Platform
linux/amd64
Imports
8 packages
Last checked
3 days ago

Tools for package owners.