min options are ignored if specified after a file argument. * Closes #10.
h3rald h3rald@h3rald.com
Fri, 03 Nov 2017 09:41:55 +0100
1 files changed,
21 insertions(+),
15 deletions(-)
jump to
M
min.nim
→
min.nim
@@ -276,35 +276,41 @@ for kind, key, val in getopt():
case kind: of cmdArgument: args.add key + if file == "": + file = key of cmdLongOption, cmdShortOption: case key: of "log", "l": - var val = val - setLogLevel(val) + if file == "": + var val = val + setLogLevel(val) of "evaluate", "e": - s = val + if file == "": + s = val of "help", "h": - echo usage - quit(0) + if file == "": + echo usage + quit(0) of "version", "v": - echo version - quit(0) + if file == "": + echo version + quit(0) of "interactive", "i": - REPL = true + if file == "": + REPL = true of "install": - INSTALL = true - libfile = val + if file == "": + INSTALL = true + libfile = val of "uninstall": - UNINSTALL = true - libfile = val + if file == "": + UNINSTALL = true + libfile = val else: discard else: discard - if args.len > 0 : - file = args[0] - if s != "": minString(s) elif file != "":