MCPcopy
hub / github.com/cli/cli / printAliases

Function printAliases

internal/docs/markdown.go:29–36  ·  view source on GitHub ↗
(w io.Writer, cmd *cobra.Command)

Source from the content-addressed store, hash-verified

27}
28
29func printAliases(w io.Writer, cmd *cobra.Command) {
30 if len(cmd.Aliases) > 0 {
31 fmt.Fprintf(w, "### ALIASES\n\n")
32 fmt.Fprint(w, text.FormatSlice(strings.Split(strings.Join(root.BuildAliasList(cmd, cmd.Aliases), ", "), ","), 0, 0, "", "", true))
33 fmt.Fprint(w, "\n\n")
34 }
35
36}
37
38func printOptions(w io.Writer, cmd *cobra.Command) error {
39 flags := cmd.NonInheritedFlags()

Callers 1

genMarkdownCustomFunction · 0.85

Calls 3

FormatSliceFunction · 0.92
BuildAliasListFunction · 0.92
JoinMethod · 0.80

Tested by

no test coverage detected