diff --git a/buffalo/cmd/plugins.go b/buffalo/cmd/plugins.go index 608875bbf..49c1bab40 100644 --- a/buffalo/cmd/plugins.go +++ b/buffalo/cmd/plugins.go @@ -32,8 +32,9 @@ func decorate(name string, cmd *cobra.Command) { for _, c := range plugs()[name] { func(c plugins.Command) { cc := &cobra.Command{ - Use: c.Name, - Short: fmt.Sprintf("[PLUGIN] %s", c.Description), + Use: c.Name, + Short: fmt.Sprintf("[PLUGIN] %s", c.Description), + Aliases: c.Aliases, RunE: func(cmd *cobra.Command, args []string) error { ax := []string{c.Name} ax = append(ax, args...) diff --git a/plugins/command.go b/plugins/command.go index 7e71bebe5..a86b1bf2b 100644 --- a/plugins/command.go +++ b/plugins/command.go @@ -7,8 +7,9 @@ type Command struct { // BuffaloCommand "generate" BuffaloCommand string `json:"buffalo_command"` // Description "generates a foo" - Description string `json:"description"` - Binary string `json:"-"` + Description string `json:"description"` + Aliases []string `json:"aliases"` + Binary string `json:"-"` } // Commands is a slice of Command