diff --git a/pkg/cmd/configure.go b/pkg/cmd/configure.go index 7ce7121a..397df055 100644 --- a/pkg/cmd/configure.go +++ b/pkg/cmd/configure.go @@ -230,7 +230,7 @@ var configureResetCmd = &cobra.Command{ }, } -// currentConfigOptionsValidArgs the options currently in use in the current scope +// configOptionsValidArgs all possible config options func configOptionsValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { persistentValidArgsFunction(cmd) diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index 48051781..1ef2f1c6 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -126,6 +126,7 @@ func checkVersion(command string) { // persistentValidArgsFunction Cobra parses flags after executing ValidArgsFunction, so we must manually initialize flags func persistentValidArgsFunction(cmd *cobra.Command) { + // more info https://github.com/spf13/cobra/issues/1291 loadFlags(cmd) }