mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
normalize flag names so that underscores are interchangeable with hyphens
This commit is contained in:
@@ -402,6 +402,9 @@ func Init(root *cobra.Command) {
|
||||
root.SetHelpFunc(show_help)
|
||||
root.SetHelpCommand(&cobra.Command{Hidden: true})
|
||||
root.CompletionOptions.DisableDefaultCmd = true
|
||||
root.SetGlobalNormalizationFunc(func(fs *pflag.FlagSet, name string) pflag.NormalizedName {
|
||||
return pflag.NormalizedName(strings.ReplaceAll(name, "_", "-"))
|
||||
})
|
||||
}
|
||||
|
||||
func Execute(root *cobra.Command) error {
|
||||
|
||||
Reference in New Issue
Block a user