diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-10 09:19:26 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-11 09:50:19 +0200 |
commit | 4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch) | |
tree | a091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/genman.go | |
parent | 018602c46db8d729af2871bd5f4c1e7480420f09 (diff) |
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/genman.go')
-rw-r--r-- | commands/genman.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/genman.go b/commands/genman.go index fd9a49720..ac4eaf8d1 100644 --- a/commands/genman.go +++ b/commands/genman.go @@ -28,17 +28,13 @@ var _ cmder = (*genManCmd)(nil) type genManCmd struct { genmandir string - cmd *cobra.Command -} - -func (c *genManCmd) getCommand() *cobra.Command { - return c.cmd + *baseCmd } func newGenManCmd() *genManCmd { cc := &genManCmd{} - cc.cmd = &cobra.Command{ + cc.baseCmd = newBaseCmd(&cobra.Command{ Use: "man", Short: "Generate man pages for the Hugo CLI", Long: `This command automatically generates up-to-date man pages of Hugo's @@ -69,7 +65,7 @@ in the "man" directory under the current directory.`, return nil }, - } + }) cc.cmd.PersistentFlags().StringVar(&cc.genmandir, "dir", "man/", "the directory to write the man pages.") |