Skip to content

Commit

Permalink
lxc/completion: Don't hide default completion command (#14474)
Browse files Browse the repository at this point in the history
The completion command is a useful tool that includes detailed
instructions for setting up completions across shell environments. Most
CLI applications don't hide this by default so it's quite intuitive for
a user to locate/use this command. Furthermore, the LXD snap completions
are only set up for Bash shells.

With this change, running `lxc completion <shell> --help` shows
instructions on generating completions.
  • Loading branch information
tomponline authored Nov 16, 2024
2 parents 46ccc8c + 0462930 commit 7c064af
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lxc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ All of LXD's features can be driven through the various commands below.
For help with any of those, simply call them with --help.`))
app.SilenceUsage = true
app.SilenceErrors = true
app.CompletionOptions = cobra.CompletionOptions{HiddenDefaultCmd: true}

// Global flags
globalCmd := cmdGlobal{cmd: app, asker: cli.NewAsker(bufio.NewReader(os.Stdin), nil)}
Expand Down

0 comments on commit 7c064af

Please sign in to comment.