package mode

import (
	

	
)

// FilterSpec specifies the configuration for the filter in listing modes.
type FilterSpec struct {
	// Called with the filter text to get the filter predicate. If nil, the
	// predicate performs substring match.
	Maker func(string) func(string) bool
	// Highlighter for the filter. If nil, the filter will not be higlighted.
	Highlighter func(string) (ui.Text, []error)
}

func ( FilterSpec) ( string) func(string) bool {
	if .Maker == nil {
		return func( string) bool { return strings.Contains(, ) }
	}
	return .Maker()
}