summaryrefslogtreecommitdiffstats
path: root/commands/genman.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/genman.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/genman.go')
-rw-r--r--commands/genman.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/genman.go b/commands/genman.go
index 3dc8d3f52..68a98a46d 100644
--- a/commands/genman.go
+++ b/commands/genman.go
@@ -42,4 +42,7 @@ in the "man" directory under the current directory.`,
func init() {
genmanCmd.PersistentFlags().StringVar(&genmandir, "dir", "man/", "the directory to write the man pages.")
+
+ // For bash-completion
+ genmanCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}