diff --git a/cmd/root.go b/cmd/root.go index bd29a5ec..fd500895 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -228,7 +228,7 @@ func Execute() { if cmd.Use == RootCmd.Use && len(os.Args) > 1 { var knownFlag bool for _, v := range os.Args { - if v == "-h" || v == "--help" || v == "--version" { + if v == "-h" || v == "--help" || v == "--version" || v == "-v" { knownFlag = true } } diff --git a/main.go b/main.go index 350b47de..8ba152e1 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,7 @@ func skipInit() bool { return true } switch os.Args[1] { - case "--version", "version": + case "-v", "--version", "version": return true case "-h", "--help", "help": return true