simple plugin search

This commit is contained in:
boombuler
2016-09-27 21:25:57 +02:00
parent 83c1136ac5
commit f3f4790103
2 changed files with 29 additions and 0 deletions

View File

@@ -118,6 +118,19 @@ func PluginCmd(args []string) {
}
case "update":
UpdatePlugins()
case "search":
searchText := strings.Join(args[1:], " ")
plugins := SearchPlugin(searchText)
messenger.Message(len(plugins), " plugins found")
for _, p := range plugins {
messenger.AddLog("\n")
messenger.AddLog(p.String())
}
if len(plugins) > 0 {
if CurView().Type != vtLog {
ToggleLog([]string{})
}
}
}
} else {
messenger.Error("Not enough arguments")