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/genchromastyles.go | |
parent | 018602c46db8d729af2871bd5f4c1e7480420f09 (diff) |
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/genchromastyles.go')
-rw-r--r-- | commands/genchromastyles.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/genchromastyles.go b/commands/genchromastyles.go index 6d7b8b5cb..a2231e56e 100644 --- a/commands/genchromastyles.go +++ b/commands/genchromastyles.go @@ -30,23 +30,19 @@ type genChromaStyles struct { style string highlightStyle string linesStyle string - cmd *cobra.Command -} - -func (c *genChromaStyles) getCommand() *cobra.Command { - return c.cmd + *baseCmd } // TODO(bep) highlight func createGenChromaStyles() *genChromaStyles { g := &genChromaStyles{ - cmd: &cobra.Command{ + baseCmd: newBaseCmd(&cobra.Command{ Use: "chromastyles", Short: "Generate CSS stylesheet for the Chroma code highlighter", Long: `Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if pygmentsUseClasses is enabled in config. See https://help.farbox.com/pygments.html for preview of available styles`, - }, + }), } g.cmd.RunE = func(cmd *cobra.Command, args []string) error { |