From 8a300ad8ed5a32df743292d56203874c0993cf77 Mon Sep 17 00:00:00 2001 From: yory8 <> Date: Wed, 2 Oct 2019 16:20:04 +0200 Subject: [PATCH] feat: add --version flag --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index e39e475..b70a536 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,8 @@ import ( "gopkg.in/alecthomas/kingpin.v2" ) +const version = "1.0.2" + var ( app = kingpin.New("clipman", "A clipboard manager for Wayland") histpath = app.Flag("histpath", "Path of history file").Default("~/.local/share/clipman.json").String() @@ -32,7 +34,9 @@ var ( ) func main() { + app.Version(version) app.HelpFlag.Short('h') + app.VersionFlag.Short('v') switch kingpin.MustParse(app.Parse(os.Args[1:])) { case "store": histfile, history, err := getHistory(*histpath)