MCPcopy Create free account
hub / github.com/cogentcore/core / SeedPath

Function SeedPath

parse/complete/complete.go:204–208  ·  view source on GitHub ↗

SeedPath returns the text after the last whitespace and path/filepath separator, which is typically used for creating a completion seed string.

(text string)

Source from the content-addressed store, hash-verified

202// SeedPath returns the text after the last whitespace and path/filepath
203// separator, which is typically used for creating a completion seed string.
204func SeedPath(text string) string {
205 return SeedAfter(text, func(r rune) bool {
206 return unicode.IsSpace(r) || r == '/' || r == filepath.Separator
207 })
208}
209
210// SeedPath returns the text after the last rune for which the given
211// function returns true, which is typically used for creating a completion

Callers 2

CompleteMatchMethod · 0.92
fileCompleteMethod · 0.92

Calls 1

SeedAfterFunction · 0.85

Tested by

no test coverage detected