MCPcopy Create free account
hub / github.com/Driver-C/tryssh / NewAliasListCommand

Function NewAliasListCommand

cmd/alias/list.go:11–27  ·  view source on GitHub ↗

NewAliasListCommand creates and returns the cobra command for listing aliases.

()

Source from the content-addressed store, hash-verified

9
10// NewAliasListCommand creates and returns the cobra command for listing aliases.
11func NewAliasListCommand() *cobra.Command {
12 cmd := &cobra.Command{
13 Use: "list",
14 Short: "List all alias",
15 Long: "List all alias",
16 Aliases: []string{"ls"},
17 Run: func(_ *cobra.Command, _ []string) {
18 configuration, err := config.LoadConfig()
19 if err != nil {
20 utils.Fatalln(err)
21 }
22 controller := control.NewAliasController("", configuration, "")
23 controller.ListAlias()
24 },
25 }
26 return cmd
27}

Calls 4

ListAliasMethod · 0.95
LoadConfigFunction · 0.92
FatallnFunction · 0.92
NewAliasControllerFunction · 0.92