MCPcopy Index your code
hub / github.com/git-bug/git-bug / newCommandsCommand

Function newCommandsCommand

commands/commands.go:15–34  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

13}
14
15func newCommandsCommand(env *execenv.Env) *cobra.Command {
16 options := commandOptions{}
17
18 cmd := &cobra.Command{
19 Use: "commands",
20 Short: "Display available commands.",
21 RunE: func(cmd *cobra.Command, args []string) error {
22 return runCommands(env, options)
23 },
24 }
25
26 flags := cmd.Flags()
27 flags.SortFlags = false
28
29 flags.BoolVarP(&options.desc, "pretty", "p", false,
30 "Output the command description as well as Markdown compatible comment",
31 )
32
33 return cmd
34}
35
36func runCommands(env *execenv.Env, opts commandOptions) error {
37 first := true

Callers 1

NewRootCommandFunction · 0.85

Calls 1

runCommandsFunction · 0.85

Tested by

no test coverage detected