diff --git a/totptool.nim b/totptool.nim index 2263708..71b1526 100644 --- a/totptool.nim +++ b/totptool.nim @@ -55,9 +55,12 @@ for kind, key, val in getopt(): case key of "help", "h": case command - of "code": code.help() - of "newSecretSecret": newSecret.help() - of "ls": ls.help() + of "code": + code.help() + of "newSecret": + newSecret.help() + of "ls": + ls.help() else: writeHelp() @@ -77,9 +80,12 @@ if not existsDir(totpRoot): echo "Created totp root " & totpRoot case command -of "code": code totpRoot, args -of "newSecretSecret": newSecret totpRoot, args -of "ls": ls totpRoot, args +of "code": + code(totpRoot, args) +of "newSecret": + newSecret(totpRoot, args) +of "ls": + ls(totpRoot, args) else: echo "Command " & command & " not found." writeHelp()