using the new BashCompSubdirsInDir annotation in spf13/cobra.
// for Bash autocomplete
validConfigFilenames := []string{"json", "js", "yaml", "yml", "toml", "tml"}
HugoCmd.PersistentFlags().SetAnnotation("config", cobra.BashCompFilenameExt, validConfigFilenames)
+ HugoCmd.PersistentFlags().SetAnnotation("theme", cobra.BashCompSubdirsInDir, []string{"themes"})
// This message will be shown to Windows users if Hugo is opened from explorer.exe
cobra.MousetrapHelpText = `