diff --git a/API.md b/API.md index 8bb45d8..d3f3a37 100644 --- a/API.md +++ b/API.md @@ -19,11 +19,6 @@ - [`babashka.cli.exec`](#babashkacliexec) - [`-main`](#-main) - Main entrypoint for command line usage. - [`main`](#main) -- [`user`](#user) - - [`global-spec`](#global-spec) - - [`sub1-spec`](#sub1-spec) - - [`sub2-spec`](#sub2-spec) - - [`table`](#table) # babashka.cli @@ -65,7 +60,7 @@ Coerce string `s` using `f`. Does not coerce when `s` is not a string. Subcommand dispatcher. - Dispatches on longest matching command entry in [`table`](#table) by matching + Dispatches on longest matching command entry in `table` by matching subcommands to the `:cmds` vector and invoking the correspondig `:fn`. Table is in the form: @@ -90,21 +85,21 @@ Subcommand dispatcher. Each entry in the table may have additional [`parse-args`](#parse-args) options. For more information and examples, see [README.md](README.md#subcommands). -
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L666-L698) +
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L671-L703) ## `format-opts` ``` clojure (format-opts {:as cfg, :keys [indent], :or {indent 2}}) ``` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L566-L570) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L570-L574) ## `format-table` ``` clojure (format-table {:keys [rows indent]}) ``` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L526-L537) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L530-L541) ## `merge-opts` ``` clojure @@ -127,21 +122,21 @@ Merges babashka CLI options. (opts->table {:keys [spec order]}) ``` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L547-L564) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L551-L568) ## `pad` ``` clojure (pad len s) ``` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L516-L516) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L520-L520) ## `pad-cells` ``` clojure (pad-cells rows) ``` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L518-L524) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L522-L528) ## `parse-args` ``` clojure @@ -152,7 +147,7 @@ Merges babashka CLI options. Same as [`parse-opts`](#parse-opts) but separates parsed opts into `:opts` and adds `:cmds` and `:rest-args` on the top level instead of metadata. -
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L494-L501) +
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L498-L505) ## `parse-cmds` ``` clojure @@ -212,9 +207,9 @@ Parse the command line arguments `args`, a seq of strings. ;; => throws 'Unknown option --qux' exception b/c there is no :qux key in the spec ``` -
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L259-L492) +
[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L259-L496) ## `rows` -[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L540-L542) +[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L544-L546) ## `spec->opts` ``` clojure @@ -257,17 +252,3 @@ Main entrypoint for command line usage. ``` [source](https://github.com/babashka/cli/blob/main/src/babashka/cli/exec.clj#L83-L86) -# user - - - - - -## `global-spec` -[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L3-L3) -## `sub1-spec` -[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L4-L4) -## `sub2-spec` -[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L5-L5) -## `table` -[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L17-L19) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fcbbe5..1478537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ For breaking changes, check [here](#breaking-changes). [Babashka CLI](https://github.com/babashka/cli): turn Clojure functions into CLIs! -## Unreleased +## v0.8.57 (2024-02-22) Fix [#82](https://github.com/babashka/cli/issues/82): prefer alias over composite option diff --git a/version.edn b/version.edn index bd1069e..dd1bfb8 100644 --- a/version.edn +++ b/version.edn @@ -1 +1 @@ -{:major 0, :minor 8, :release 56} +{:major 0, :minor 8, :release 57}