Liking cljdoc? Tell your friends :D

org.soulspace.clj.cli

Functions to define and parse command line options.

Functions to define and parse command line options.
raw docstring

add-resultclj

(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.
sourceraw docstring

build-specsclj

(build-specs option-defs)

Build option specifications from the option definitions.

Build option specifications from the option definitions.
sourceraw docstring

default-option-mapclj

(default-option-map specs)

Returns an option map initalized with the default values.

Returns an option map initalized with the default values.
sourceraw docstring

doc-for-specclj

(doc-for-spec {:keys [long short doc default]})

Returns the documentation for the specification.

Returns the documentation for the specification.
sourceraw docstring

doc-for-specsclj

(doc-for-specs specs)

Returns the documentation for the specifications.

Returns the documentation for the specifications.
sourceraw docstring

doc-optionsclj

(doc-options option-defs)
source

flag-spec?clj

(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-]'.
sourceraw docstring

long-option?clj

(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 '--'.
sourceraw docstring

matches-option?clj

(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.
sourceraw docstring

option-nameclj

(option-name opt)

Returns the name of the option.

Returns the name of the option.
sourceraw docstring

option?clj

(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 '-'.
sourceraw docstring

parse-argsclj

(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.
sourceraw docstring

parse-option-argclj

(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.
sourceraw docstring

parse-option-argsclj

(parse-option-args specs option-args)

Parses a sequence of options.

Parses a sequence of options.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close