Restore --version
This commit is contained in:
parent
bb3b1da25b
commit
fd3f86c8a5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue