diff --git a/pkg/cmd/gist/create/create.go b/pkg/cmd/gist/create/create.go index 4c15e9b17..a60826813 100644 --- a/pkg/cmd/gist/create/create.go +++ b/pkg/cmd/gist/create/create.go @@ -86,6 +86,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co } return nil }, + Aliases: []string{"new"}, RunE: func(c *cobra.Command, args []string) error { opts.Filenames = args diff --git a/pkg/cmd/issue/create/create.go b/pkg/cmd/issue/create/create.go index db0ab7c0d..640057100 100644 --- a/pkg/cmd/issue/create/create.go +++ b/pkg/cmd/issue/create/create.go @@ -64,7 +64,8 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co $ gh issue create --assignee "@me" $ gh issue create --project "Roadmap" `), - Args: cmdutil.NoArgsQuoteReminder, + Args: cmdutil.NoArgsQuoteReminder, + Aliases: []string{"new"}, RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/pr/create/create.go b/pkg/cmd/pr/create/create.go index 53311b7f1..e31dba655 100644 --- a/pkg/cmd/pr/create/create.go +++ b/pkg/cmd/pr/create/create.go @@ -116,7 +116,8 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co $ gh pr create --project "Roadmap" $ gh pr create --base develop --head monalisa:feature `), - Args: cmdutil.NoArgsQuoteReminder, + Args: cmdutil.NoArgsQuoteReminder, + Aliases: []string{"new"}, RunE: func(cmd *cobra.Command, args []string) error { opts.Finder = shared.NewFinder(f) diff --git a/pkg/cmd/release/create/create.go b/pkg/cmd/release/create/create.go index 5e5c14a6c..67d1f85f1 100644 --- a/pkg/cmd/release/create/create.go +++ b/pkg/cmd/release/create/create.go @@ -109,6 +109,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co Create a release and start a discussion $ gh release create v1.2.3 --discussion-category "General" `), + Aliases: []string{"new"}, RunE: func(cmd *cobra.Command, args []string) error { if cmd.Flags().Changed("discussion-category") && opts.Draft { return errors.New("discussions for draft releases not supported") diff --git a/pkg/cmd/repo/create/create.go b/pkg/cmd/repo/create/create.go index fa8f63539..c105adb9a 100644 --- a/pkg/cmd/repo/create/create.go +++ b/pkg/cmd/repo/create/create.go @@ -82,7 +82,8 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co # create a remote repository from the current directory gh repo create my-project --private --source=. --remote=upstream `), - Args: cobra.MaximumNArgs(1), + Args: cobra.MaximumNArgs(1), + Aliases: []string{"new"}, RunE: func(cmd *cobra.Command, args []string) error { if len(args) > 0 { opts.Name = args[0]