Restore --version

This commit is contained in:
Christine Dodrill 2016-02-04 17:40:40 -08:00
parent bb3b1da25b
commit fd3f86c8a5
1 changed files with 3 additions and 3 deletions

View File

@ -31,12 +31,11 @@ proc writeHelp() =
echo usageHelp echo usageHelp
quit 2 quit 2
proc writeVersion() = proc writeVersion(): string =
const const
gitlog = staticExec "git log -1" gitlog = staticExec "git log -1"
echo gitlog return gitlog
quit 1
commandline: commandline:
subcommand codecmd, "code": subcommand codecmd, "code":
@ -53,6 +52,7 @@ commandline:
option root, string, "root", "r", getHomeDir() / "life" / "crypto" / "totp" option root, string, "root", "r", getHomeDir() / "life" / "crypto" / "totp"
exitoption "help", "h", usageHelp exitoption "help", "h", usageHelp
exitoption "version", "v", writeVersion()
errormsg "Invalid state or input" errormsg "Invalid state or input"
if not existsDir(root): if not existsDir(root):