search

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecursiveSearchFiles

func RecursiveSearchFiles(query, currentDir string, showHidden bool, shouldIgnoreFn func(string) bool) ([]Result, []MatchResult)

RecursiveSearchFiles searches for files recursively using fuzzy matching

Types

type MatchResult

type MatchResult struct {
	Index          int
	MatchedIndexes []int
}

MatchResult contains fuzzy match information

func FuzzyMatchNames

func FuzzyMatchNames(query string, names []string) []MatchResult

FuzzyMatchNames performs fuzzy matching on a list of names Returns the indices of matches and their matched character positions

type Result

type Result struct {
	Path        string
	DisplayName string
	IsDir       bool
	Size        int64
	ModTime     time.Time
	LineNumber  int // For content searches
}

Result represents a search result with path and display name

func SearchFileContent

func SearchFileContent(query, currentDir string, showHidden bool) ([]Result, error)

SearchFileContent searches for content within files using ripgrep

Jump to

Keyboard shortcuts

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