add negation to search options
@@ -62,6 +62,7 @@ var pathCmd = &cobra.Command{
Searcher: func(input string, index int) bool {
kws := strings.Split(input, " ")
result := true
+ count := 0
for _, kw := range kws {
if strings.HasPrefix(kw, "!") {
kw = strings.TrimLeft(kw, "!")
@@ -73,6 +74,9 @@ var pathCmd = &cobra.Command{
result = result && strings.Contains(paths[index], kw)
}
}
+ if result {
+ count++
+ }
return result
},
Keys: &promptui.SelectKeys{
