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):