1package alias
2
3import (
4	"github.com/MakeNowJust/heredoc"
5	deleteCmd "github.com/cli/cli/v2/pkg/cmd/alias/delete"
6	listCmd "github.com/cli/cli/v2/pkg/cmd/alias/list"
7	setCmd "github.com/cli/cli/v2/pkg/cmd/alias/set"
8	"github.com/cli/cli/v2/pkg/cmdutil"
9	"github.com/spf13/cobra"
10)
11
12func NewCmdAlias(f *cmdutil.Factory) *cobra.Command {
13	cmd := &cobra.Command{
14		Use:   "alias <command>",
15		Short: "Create command shortcuts",
16		Long: heredoc.Doc(`
17			Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
18
19			Run "gh help alias set" to learn more.
20		`),
21	}
22
23	cmdutil.DisableAuthCheck(cmd)
24
25	cmd.AddCommand(deleteCmd.NewCmdDelete(f, nil))
26	cmd.AddCommand(listCmd.NewCmdList(f, nil))
27	cmd.AddCommand(setCmd.NewCmdSet(f, nil))
28
29	return cmd
30}
31