mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
simple plugin search
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user