summaryrefslogtreecommitdiffstats
path: root/commands/gendoc.go
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-12-02 02:20:55 -0700
committerAnthony Fok <foka@debian.org>2015-12-02 02:24:49 -0700
commit666ddd237791b56fd048992dca9a27d1af50a10e (patch)
treef841ee78bbe54a64b2c4eb9a77557aeaf78ab3ad /commands/gendoc.go
parent0d1d33d7f3a3867a0dc0a43ee02fd5cb84ec17fd (diff)
Enable dirname and filename completion for more flags
These flags are: * --source (-s), --cacheDir, --destination (-d) and --logFile * --completionfile and --dir.
Diffstat (limited to 'commands/gendoc.go')
-rw-r--r--commands/gendoc.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/gendoc.go b/commands/gendoc.go
index ed7f073ac..9589bffa4 100644
--- a/commands/gendoc.go
+++ b/commands/gendoc.go
@@ -60,4 +60,7 @@ for rendering in Hugo.`,
func init() {
gendocCmd.PersistentFlags().StringVar(&gendocdir, "dir", "/tmp/hugodoc/", "the directory to write the doc.")
+
+ // For bash-completion
+ gendocCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}