aboutsummaryrefslogtreecommitdiff
path: root/main.nim
diff options
context:
space:
mode:
authoreuxane2024-11-25 01:09:48 +0100
committereuxane2024-11-25 01:09:48 +0100
commit9df9f0c41ea6aa59cb34151c0505f6fae36ef12e (patch)
tree44f1531319354a89b4689291e5a3024473527466 /main.nim
parent4cd66c433da6e95ee8869e954f835c5ecf4bd8d0 (diff)
downloadtickwatch-9df9f0c41ea6aa59cb34151c0505f6fae36ef12e.tar.gz
cli: combine min/max into range argv2.0
Diffstat (limited to 'main.nim')
-rw-r--r--main.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.nim b/main.nim
index e93e144..3128bac 100644
--- a/main.nim
+++ b/main.nim
@@ -66,8 +66,10 @@ proc main() =
66 of "unicode", "utf8", "utf-8": symbols = UNICODE_SYMBOLS 66 of "unicode", "utf8", "utf-8": symbols = UNICODE_SYMBOLS
67 of "numeric", "ascii": symbols = NUMERIC_SYMBOLS 67 of "numeric", "ascii": symbols = NUMERIC_SYMBOLS
68 68
69 of "min": min = parseInt(val) 69 of "range":
70 of "max": max = parseInt(val) 70 let parts = val.split(':', 1)
71 if parts.len != 2: raise newException(ValueError, "Invalid range")
72 (min, max) = (parseInt(parts[0]), parseInt(parts[1]))
71 73
72 of "ping": 74 of "ping":
73 let targetIp = resolve(val) 75 let targetIp = resolve(val)