1
0
mirror of https://github.com/containers/buildah.git synced 2025-04-18 07:04:05 +03:00

cli: hide the completion command instead of disabling it outright

Hide the cobra built-in `completion` command instead of disabling it
outright, since eventually we want to switch to using it instead of the
hand-written scripts we're currently using.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2025-03-26 14:00:11 -04:00
parent dca9197ba1
commit 08cc023eef

View File

@ -85,8 +85,8 @@ func init() {
defaultContainerConfig.CheckCgroupsAndAdjustConfig()
cobra.OnInitialize(initConfig)
// Disable the implicit `completion` command in cobra.
rootCmd.CompletionOptions.DisableDefaultCmd = true
// Hide the implicit `completion` command in cobra.
rootCmd.CompletionOptions.HiddenDefaultCmd = true
// rootCmd.TraverseChildren = true
rootCmd.Version = fmt.Sprintf("%s (image-spec %s, runtime-spec %s)", define.Version, ispecs.Version, rspecs.Version)
rootCmd.PersistentFlags().BoolVar(&globalFlagResults.Debug, "debug", false, "print debugging information")