Commit graph

1 commit

Author SHA1 Message Date
Marc Khouzam
3ae090bcba Make the default completion accessible
Fixes #1507

This allows a program to set whatever field it wants on the default
completion command before calling rootCmd.Execute().  For example,

  cobra.CompletionCmd.Hidden = true  // To make the command hidden

or/and

  cobra.CompletionCmd.Use = "shellcomplete" // To rename the command

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2021-11-03 08:50:02 -04:00