MCPcopy
hub / github.com/cli/cli / NewCmdAlias

Function NewCmdAlias

pkg/cmd/alias/alias.go:13–32  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

11)
12
13func NewCmdAlias(f *cmdutil.Factory) *cobra.Command {
14 cmd := &cobra.Command{
15 Use: "alias <command>",
16 Short: "Create command shortcuts",
17 Long: heredoc.Docf(`
18 Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
19
20 Run %[1]sgh help alias set%[1]s to learn more.
21 `, "`"),
22 }
23
24 cmdutil.DisableAuthCheck(cmd)
25
26 cmd.AddCommand(deleteCmd.NewCmdDelete(f, nil))
27 cmd.AddCommand(importCmd.NewCmdImport(f, nil))
28 cmd.AddCommand(listCmd.NewCmdList(f, nil))
29 cmd.AddCommand(setCmd.NewCmdSet(f, nil))
30
31 return cmd
32}

Callers

nothing calls this directly

Calls 1

DisableAuthCheckFunction · 0.92

Tested by

no test coverage detected