Created
July 17, 2021 18:28
-
-
Save mikeananev/66f1865b66ece55a2034efe9c49aec43 to your computer and use it in GitHub Desktop.
Tip from @borkdude: Fun way to get arg parsing without much boilerplate:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
(require '[selmer.parser :refer [<<]]) | |
(let [[& {:strs [-a -b --long-opt]}] *command-line-args*] | |
(<< "Command line opts: a: {{-a}}, b: {{-b}}, long-opt: {{--long-opt}}")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment