From 5057bd479159c86e5a937200fb2c67a9631b3a6f Mon Sep 17 00:00:00 2001 From: Simon de Vlieger Date: Tue, 8 Apr 2025 08:48:01 +0200 Subject: [PATCH] main: hide `completion` command The `completion` command doesn't need to be quite so discoverable. Let's have only actual subcommands listed and mention this in (future) documentation instead. Signed-off-by: Simon de Vlieger --- cmd/image-builder/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/image-builder/main.go b/cmd/image-builder/main.go index 773fe86..bc33e7f 100644 --- a/cmd/image-builder/main.go +++ b/cmd/image-builder/main.go @@ -389,6 +389,9 @@ Image-builder builds operating system images for a range of predefined operating systems like Fedora, CentOS and RHEL with easy customizations support.`, SilenceErrors: true, Version: BuildVersion, + CompletionOptions: cobra.CompletionOptions{ + HiddenDefaultCmd: true, + }, } rootCmd.PersistentFlags().String("data-dir", "", `Override the default data directory for e.g. custom repositories/*.json data`) rootCmd.PersistentFlags().StringArray("extra-repo", nil, `Add an extra repository during build (will *not* be gpg checked and not be part of the final image)`)