2022-03-12 22:43:32 -08:00
|
|
|
package cli
|
2022-03-12 13:04:08 -08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// versionCmd represents the version command
|
|
|
|
var versionCmd = &cobra.Command{
|
|
|
|
Use: "version",
|
|
|
|
Short: "Print the version",
|
2022-05-05 02:26:20 -07:00
|
|
|
Long: "Print the version number of oh-my-posh.",
|
|
|
|
Args: cobra.NoArgs,
|
2022-03-12 13:04:08 -08:00
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2022-03-12 22:43:32 -08:00
|
|
|
fmt.Println(cliVersion)
|
2022-03-12 13:04:08 -08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-08-04 23:33:02 -07:00
|
|
|
func init() { //nolint:gochecknoinits
|
2022-03-12 13:04:08 -08:00
|
|
|
rootCmd.AddCommand(versionCmd)
|
|
|
|
}
|