From a5d97f935848e21130bf8f1c63d366f79f5f9a5e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 3 Oct 2025 11:26:42 -0500 Subject: fix --version --- Makefile | 2 +- argv.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3931172..46aacad 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION = $(shell git describe --tags) -BUILDTIME = $(shell date +%Y.%m.%d_%H%M) +BUILDTIME = $(shell date +%s) simple: test # make -C example clean simpleMutexGlobal goimports vet diff --git a/argv.go b/argv.go index 8542fe5..237f1b0 100644 --- a/argv.go +++ b/argv.go @@ -63,11 +63,15 @@ func (args) Appname() string { return ARGNAME } +func (args) Buildtime() (string, string) { + return BUILDTIME, VERSION +} + func (a args) DoAutoComplete(pb *prep.Auto) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--delete", "--dry-run"}) + pb.Autocomplete3([]string{"--bash", "--proto", "--regret", "--debug", "--delete", "--dry-run", "--version"}) } else { - pb.SubCommand(pb.Argv...) + pb.SubCommand(pb.Goargs...) } os.Exit(0) } -- cgit v1.2.3