Add 'new' as alias for 'create' command
Amp-Thread-ID: https://ampcode.com/threads/T-fd346dc3-c2b3-4ffd-8c08-432b6563d378 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -17,9 +17,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var createCmd = &cobra.Command{
|
var createCmd = &cobra.Command{
|
||||||
Use: "create [title]",
|
Use: "create [title]",
|
||||||
Short: "Create a new issue (or multiple issues from markdown file)",
|
Aliases: []string{"new"},
|
||||||
Args: cobra.MinimumNArgs(0), // Changed to allow no args when using -f
|
Short: "Create a new issue (or multiple issues from markdown file)",
|
||||||
|
Args: cobra.MinimumNArgs(0), // Changed to allow no args when using -f
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
file, _ := cmd.Flags().GetString("file")
|
file, _ := cmd.Flags().GetString("file")
|
||||||
fromTemplate, _ := cmd.Flags().GetString("from-template")
|
fromTemplate, _ := cmd.Flags().GetString("from-template")
|
||||||
|
|||||||
Reference in New Issue
Block a user