(add-result option-map [spec value])
Add the value for an option to the option map. Handles multiple values per option.
Add the value for an option to the option map. Handles multiple values per option.
(build-specs option-defs)
Build option specifications from the option definitions.
Build option specifications from the option definitions.
(default-option-map specs)
Returns an option map initalized with the default values.
Returns an option map initalized with the default values.
(doc-for-spec {:keys [long short doc default]})
Returns the documentation for the specification.
Returns the documentation for the specification.
(doc-for-specs specs)
Returns the documentation for the specifications.
Returns the documentation for the specifications.
(doc-options option-defs)
(flag-spec? arg)
Tests if the string is a flag, which starts with the string '--[no-]'.
Tests if the string is a flag, which starts with the string '--[no-]'.
(long-option? arg)
Tests if the string is a long option, which starts with the string '--'.
Tests if the string is a long option, which starts with the string '--'.
(matches-option? arg spec)
Returns true, if the arg starts with an option switch of this spec.
Returns true, if the arg starts with an option switch of this spec.
(option-name opt)
Returns the name of the option.
Returns the name of the option.
(option? arg)
Tests if the string is an option, which starts with the character '-'.
Tests if the string is an option, which starts with the character '-'.
(parse-args args option-definitions)
Parses the args sequence into a vector of options and arguments.
Parses the args sequence into a vector of options and arguments.
(parse-option-arg specs arg)
Returns the option spec and the parsed value in a vector, if a matching option is found.
Returns the option spec and the parsed value in a vector, if a matching option is found.
(parse-option-args specs option-args)
Parses a sequence of options.
Parses a sequence of options.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close