Add version to cobra help page

This commit is contained in:
David Dworken 2022-11-14 20:20:55 -08:00
parent 27bbe97cb2
commit 6ef9bb00d5
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -6,6 +6,7 @@ package cmd
import ( import (
"os" "os"
"github.com/ddworken/hishtory/client/lib"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@ -28,4 +29,5 @@ func init() {
rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_QUERYING, Title: "History Searching"}) rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_QUERYING, Title: "History Searching"})
rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_MANAGEMENT, Title: "History Management"}) rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_MANAGEMENT, Title: "History Management"})
rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_CONFIG, Title: "Configuration"}) rootCmd.AddGroup(&cobra.Group{ID: GROUP_ID_CONFIG, Title: "Configuration"})
rootCmd.Version = "v0." + lib.Version
} }

View File

@ -13,7 +13,5 @@ func main() {
/* /*
Remaining things: Remaining things:
* Support exclusions in searches * Support exclusions in searches
* Figure out how to hide certain things from the help doc
* Figure out how to reorder the docs
* Acutally migrate saveHistoryEntry to cobra * Acutally migrate saveHistoryEntry to cobra
*/ */