1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

fix: disable fuzzy

This commit is contained in:
Valentin Maerten
2025-11-20 19:49:02 +01:00
parent 799bc85498
commit 415cf4a4fe

View File

@@ -103,24 +103,25 @@ func (e *Executor) readTaskfile(node taskfile.Node) error {
}
func (e *Executor) setupFuzzyModel() {
if e.Taskfile == nil {
return
}
model := fuzzy.NewModel()
model.SetThreshold(1) // because we want to build grammar based on every task name
var words []string
for name, task := range e.Taskfile.Tasks.All(nil) {
if task.Internal {
continue
}
words = append(words, name)
words = slices.Concat(words, task.Aliases)
}
model.Train(words)
e.fuzzyModel = model
//
//model := fuzzy.NewModel()
//model.SetThreshold(1) // because we want to build grammar based on every task name
//
//var words []string
//for name, task := range e.Taskfile.Tasks.All(nil) {
// if task.Internal {
// continue
// }
// words = append(words, name)
// words = slices.Concat(words, task.Aliases)
//}
//
//model.Train(words)
//e.fuzzyModel = model
}
func (e *Executor) setupTempDir() error {