Documentation
¶
Index ¶
- Constants
- func BuildMatcher(query string, opts Options) (func(string) bool, error)
- func CachedFileTexts(path string, read func(string) ([]string, error)) ([]string, error)
- func FileContains(path string, match func(string) bool, read func(string) ([]string, error)) (bool, error)
- func Filter(query string, opts Options) (map[string]struct{}, error)
- func TextsContain(texts []string, match func(string) bool) bool
- type Options
Constants ¶
View Source
const (
EnvCacheDir = "CCSESSION_GREP_CACHE_DIR"
)
Variables ¶
This section is empty.
Functions ¶
func BuildMatcher ¶ added in v0.3.0
BuildMatcher returns a predicate reporting whether a text fragment matches the query. Regex mode compiles a case-insensitive regexp; otherwise the query is a case-insensitive fixed-string substring test. Exported so other sources (OpenCode) share the exact same match semantics as the claude grep.
func CachedFileTexts ¶ added in v0.6.1
CachedFileTexts returns extracted searchable text for path, reusing a metadata-validated on-disk cache when possible.
func FileContains ¶ added in v0.6.1
func FileContains(path string, match func(string) bool, read func(string) ([]string, error)) (bool, error)
FileContains reports whether any cached or freshly read text from path matches.
Types ¶
type Options ¶ added in v0.1.1
type Options struct {
// Regex turns the query into a case-insensitive regular expression.
// When false (default), the query is matched as a case-insensitive
// fixed string, which means regex metacharacters in the query are
// treated as literals.
Regex bool
}
Options controls Filter behavior.
Click to show internal directories.
Click to hide internal directories.