summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAnton Harniakou <anton.harniakou@gmail.com>2019-01-31 15:06:18 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-02-01 07:17:37 +0100
commitd9282cf98a346fcf98f363d9c353e4920ca85fc7 (patch)
tree440d1c8d3d5fc49f93c2df814003b75e84965ad6 /commands
parentc52045bbb38cbf64b9cb39352230060aa122cc9f (diff)
Store supported config formats in a variable
Diffstat (limited to 'commands')
-rw-r--r--commands/commands.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/commands.go b/commands/commands.go
index c2fb90830..38291fd95 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -167,8 +167,7 @@ Complete documentation is available at http://gohugo.io/.`,
cc.cmd.PersistentFlags().BoolVar(&cc.quiet, "quiet", false, "build in quiet mode")
// Set bash-completion
- validConfigFilenames := []string{"json", "js", "yaml", "yml", "toml", "tml"}
- _ = cc.cmd.PersistentFlags().SetAnnotation("config", cobra.BashCompFilenameExt, validConfigFilenames)
+ _ = cc.cmd.PersistentFlags().SetAnnotation("config", cobra.BashCompFilenameExt, config.ValidConfigFileExtensions)
cc.cmd.PersistentFlags().BoolVarP(&cc.verbose, "verbose", "v", false, "verbose output")
cc.cmd.PersistentFlags().BoolVarP(&cc.debug, "debug", "", false, "debug output")