Skip to main content

General

20
  • auto-coerce

    Auto-coerces `s` to data. Does not coerce when `s` is not a string. If `s`: * is `true` or `false`, it is coerced as...

  • coerce

    Coerce string `s` using `f`. Does not coerce when `s` is not a string. `f` may be a keyword (`:boolean`, `:int`, `:dou...

  • dispatch

    Subcommand dispatcher. Dispatches on longest matching command entry in `table` by matching subcommands to the `:cmd...

  • format-lines

    Format a sequence of summary parts into columns. lens is a sequence of lengths to use for parts. There are two sequenc...

  • get-default-options

    Extract the map of default options from a sequence of option vectors. As of 0.4.1, this also applies any :default-fn ...

  • make-summary-part

    Given a single compiled option spec, turn it into a formatted string, optionally with its default values if requested.

  • merge-opts

    Merges babashka CLI options.

  • parse-args

    Same as `parse-opts` but separates parsed opts into `:opts` and adds `:cmds` and `:rest-args` on the top level instead...

  • parse-cmds

    Parses sub-commands (arguments not starting with an option prefix) and returns a map with: * `:cmds` - The parsed subc...

  • parse-keyword

    Parse keyword from `s`. Ignores leading `:`.

  • parse-opts

    Parse the command line arguments `args`, a seq of strings. Instead of a leading `:` either `--` or `-` may be used as ...

  • parse-opts

    Parse arguments sequence according to given option specifications and the GNU Program Argument Syntax Conventions: ...

  • spec->opts

    Converts spec into opts format. Pass existing opts as optional second argument.

  • summarize

    Reduce options specs into a options summary for printing at a terminal. Note that the specs argument should be the com...