diff --git a/commands/hugo.go b/commands/hugo.go index e1a75a097..db30148d1 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -111,9 +111,7 @@ func init() { // for Bash autocomplete validConfigFilenames := []string{"json", "js", "yaml", "yml", "toml", "tml"} - annotation := make(map[string][]string) - annotation[cobra.BashCompFilenameExt] = validConfigFilenames - HugoCmd.PersistentFlags().Lookup("config").Annotations = annotation + HugoCmd.PersistentFlags().SetAnnotation("config", cobra.BashCompFilenameExt, validConfigFilenames) // This message will be shown to Windows users if Hugo is opened from explorer.exe cobra.MousetrapHelpText = `