mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Implement hugo --theme=[Tab][Tab]
bash completion
using the new BashCompSubdirsInDir annotation in spf13/cobra.
This commit is contained in:
parent
7555e364d0
commit
29c9a40a8d
1 changed files with 1 additions and 0 deletions
|
@ -112,6 +112,7 @@ func init() {
|
||||||
// for Bash autocomplete
|
// for Bash autocomplete
|
||||||
validConfigFilenames := []string{"json", "js", "yaml", "yml", "toml", "tml"}
|
validConfigFilenames := []string{"json", "js", "yaml", "yml", "toml", "tml"}
|
||||||
HugoCmd.PersistentFlags().SetAnnotation("config", cobra.BashCompFilenameExt, validConfigFilenames)
|
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
|
// This message will be shown to Windows users if Hugo is opened from explorer.exe
|
||||||
cobra.MousetrapHelpText = `
|
cobra.MousetrapHelpText = `
|
||||||
|
|
Loading…
Reference in a new issue