release 0.0.7

This commit is contained in:
2020-02-12 16:31:01 +01:00
parent 5b3b72e127
commit 7192a0d12c
4 changed files with 239 additions and 123 deletions

View File

@@ -4,10 +4,11 @@
(let [p (=> (CLI.new @"My super cool tool!")
(CLI.add &(CLI.int "flag" "f" "my flag" true))
(CLI.add &(CLI.str "thing" "t" "my thing" false @"hi" &[@"a" @"b" @"hi"]))
(CLI.add &(CLI.str "other" "o" "my thing" false)))]
(CLI.add &(CLI.bool "boolean" "b" "my boolean"))
(CLI.add &(CLI.str "other" "o" "my other thing" false)))]
(match (CLI.parse &p)
(Result.Success flags)
(println*
&(str &(Map.get &flags "flag")) " " &(str &(Map.get &flags "thing"))
" " &(str &(Map.get &flags "other")))
" " &(str &(Map.get &flags "other")) " " &(str &(Map.get &flags "boolean")))
(Result.Error msg) (do (IO.errorln &msg) (CLI.usage &p)))))