Skip to content

Commit f4aacb6

Browse files
committed
Unhide hidden / aliased flags on completion
1 parent 2d750c5 commit f4aacb6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

run.go

+12
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ func New(cliargs []string) ContextExecutor {
8484
_ = cmd.Flags().Set(f.Name, fmt.Sprintf("%v", v.Get(f.Name)))
8585
}
8686
})
87+
88+
// unhide params
89+
switch {
90+
case bashCompletion,
91+
zshCompletion,
92+
fishCompletion,
93+
powershellCompletion,
94+
cmd.Name() == "__complete":
95+
for _, name := range []string{"no-psqlrc", "no-usqlrc", "var", "variable"} {
96+
cmd.Root().Flags().Lookup(name).Hidden = false
97+
}
98+
}
8799
return nil
88100
},
89101
RunE: func(cmd *cobra.Command, cliargs []string) error {

0 commit comments

Comments
 (0)