Add support for plugin manager within micro

This commit is contained in:
Zachary Yedidia
2020-02-02 14:20:39 -05:00
parent 09ea82c97e
commit b0624cb66e
6 changed files with 190 additions and 129 deletions

View File

@@ -120,11 +120,20 @@ func CommandAction(cmd string) BufKeyAction {
}
}
var PluginCmds = []string{"list", "info", "version"}
var PluginCmds = []string{"install", "remove", "update", "available", "list", "search"}
// PluginCmd installs, removes, updates, lists, or searches for given plugins
func (h *BufPane) PluginCmd(args []string) {
InfoBar.Error("Plugin command disabled")
if len(args) < 1 {
InfoBar.Error("Not enough arguments")
return
}
if h.Buf.Type != buffer.BTLog {
OpenLogBuf(h)
}
config.PluginCommand(buffer.LogBuf, args[0], args[1:])
}
// RetabCmd changes all spaces to tabs or all tabs to spaces