Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tools.cli for command-line arguments feature #16

Open
rplevy-draker opened this issue Feb 1, 2013 · 0 comments
Open

use tools.cli for command-line arguments feature #16

rplevy-draker opened this issue Feb 1, 2013 · 0 comments

Comments

@rplevy-draker
Copy link
Contributor

If no cli-options are provided, the arguments are parsed as is, but if options are provided they are used.

Without options:

  {:src args, :as :cli}

With options:

  {:src args, :as :cli, :cli-options ["-f" "--foo.bar" :parse-fn #(Integer. %)]}

Another option to provide a function to do something with usage:

  {:src args :as :cli, :cli-help-fn (fn [help-key banner] (when (= help-key :help) (println banner) (System/exit 0)))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant