From fd3f86c8a55f8ddf221530255faa92b8666a5096 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Thu, 4 Feb 2016 17:40:40 -0800 Subject: [PATCH] Restore --version --- totptool.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/totptool.nim b/totptool.nim index 6f9c897..30e4016 100644 --- a/totptool.nim +++ b/totptool.nim @@ -31,12 +31,11 @@ proc writeHelp() = echo usageHelp quit 2 -proc writeVersion() = +proc writeVersion(): string = const gitlog = staticExec "git log -1" - echo gitlog - quit 1 + return gitlog commandline: subcommand codecmd, "code": @@ -53,6 +52,7 @@ commandline: option root, string, "root", "r", getHomeDir() / "life" / "crypto" / "totp" exitoption "help", "h", usageHelp + exitoption "version", "v", writeVersion() errormsg "Invalid state or input" if not existsDir(root):