Skip to content

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

Description

@rplevy-draker

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)))}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions