babashka.cli
A
Auto-coerces `s` to data. Does not coerce when `s` is not a string. If `s`: * is `true` or `false`, it is coerced as...
function([s])
C
Coerce string `s` using `f`. Does not coerce when `s` is not a string. `f` may be a keyword (`:boolean`, `:int`, `:dou...
function([s f])
D
Subcommand dispatcher. Dispatches on longest matching command entry in `table` by matching subcommands to the `:cmd...
function([table args] [table args opts])
F
- function
([{:as cfg, :keys [indent], :or {indent 2}}])
- function
([{:keys [rows indent], :or {indent 2}}])
M
Merges babashka CLI options.
function([m & ms])
N
- function
([c])
O
- function
([{:keys [spec order]}])
P
- function
([len s])
- function
([rows])
Same as `parse-opts` but separates parsed opts into `:opts` and adds `:cmds` and `:rest-args` on the top level instead...
function([args] [args opts])
Parses sub-commands (arguments not starting with an option prefix) and returns a map with: * `:cmds` - The parsed subc...
function([args] [args {:keys [no-keyword-opts]}])
Parse keyword from `s`. Ignores leading `:`.
function([s])
Parse the command line arguments `args`, a seq of strings. Instead of a leading `:` either `--` or `-` may be used as ...
function([args] [args opts])
S
Converts spec into opts format. Pass existing opts as optional second argument.
function([spec] [spec {:keys [exec-args]}])