MCPcopy
hub / github.com/urfave/cli / buildCompletionCommand

Function buildCompletionCommand

completion.go:65–79  ·  completion.go::buildCompletionCommand
(appName string)

Source from the content-addressed store, hash-verified

63`
64
65func buildCompletionCommand(appName string) *Command {
66 cmd := &Command{
67 Name: completionCommandName,
68 Hidden: true,
69 Usage: "Output shell completion script for bash, zsh, fish, or Powershell",
70 Description: strings.ReplaceAll(completionDescription, "$COMMAND", appName),
71 isCompletionCommand: true,
72 }
73
74 for _, shell := range completionShells {
75 cmd.Commands = append(cmd.Commands, buildShellCompletionSubcommand(shell, shellCompletions[shell], appName))
76 }
77
78 return cmd
79}
80
81func buildShellCompletionSubcommand(shell string, render renderCompletion, appName string) *Command {
82 return &Command{

Callers 2

setupDefaultsMethod · 0.85

Calls 1

Tested by 1