()
| 61 | } |
| 62 | |
| 63 | func (c *PluginConfig) ListCommands() []string { |
| 64 | plugins := c.Plugins() |
| 65 | allCommands := []string{} |
| 66 | |
| 67 | for _, plugin := range plugins { |
| 68 | for _, command := range plugin.Commands { |
| 69 | allCommands = append(allCommands, command.Name) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | return allCommands |
| 74 | } |
| 75 | |
| 76 | func (c *PluginConfig) init() { |
| 77 | // only read from disk if it was never read |