The library was originally based on Clargon (a library I wrote) which
had the interface you are describing (optional and required
functions). Various changes were made after getting feedback on the
clojure-dev mailing list, which you can read about here if you're
interested:

https://groups.google.com/d/topic/clojure-dev/KGvzndhX5vk/discussion

Hopefully the project documentation is clear about its use:

https://github.com/clojure/tools.cli

Hope that helps,

Gaz

On Fri, Aug 24, 2012 at 2:52 PM, octopusgrabbus
<octopusgrab...@gmail.com> wrote:
> Given the following code
>
> (defn parse-opts
>   "Using the newer cli library, parses command line args."
>   [args]
>   (cli args
>        (optional ["--in-file-name" ".csv input file" :default
> "resultset.csv"] identity)
>        (optional ["--out-file-name" ".csv pipe delimited output file"
> :default "accumail_out.unl"] )))
>
> What is the origin of optional, and why do tools.cli examples that I can
> find now leave out (optional ... ?
>
> Would current examples still use identity?
>
> Here is why I'm asking:
>
> http://stackoverflow.com/questions/12112403/how-do-i-mix-non-optional-cli-arguments-with-optional-ones
>
> Thanks for any pointers or help.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to