Skip to content

Commit

Permalink
Unhide hidden / aliased flags on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Apr 3, 2024
1 parent 2d750c5 commit f4aacb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ func New(cliargs []string) ContextExecutor {
_ = cmd.Flags().Set(f.Name, fmt.Sprintf("%v", v.Get(f.Name)))
}
})

// unhide params
switch {
case bashCompletion,
zshCompletion,
fishCompletion,
powershellCompletion,
cmd.Name() == "__complete":
for _, name := range []string{"no-psqlrc", "no-usqlrc", "var", "variable"} {
cmd.Root().Flags().Lookup(name).Hidden = false
}
}
return nil
},
RunE: func(cmd *cobra.Command, cliargs []string) error {
Expand Down

0 comments on commit f4aacb6

Please sign in to comment.