Skip to content

Commit

Permalink
v0.8.57
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Feb 22, 2024
1 parent 7c5b207 commit 1e4ead0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 31 deletions.
39 changes: 10 additions & 29 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand All @@ -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).
<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L666-L698)</sub>
<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L671-L703)</sub>
## `format-opts`
``` clojure

(format-opts {:as cfg, :keys [indent], :or {indent 2}})
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L566-L570)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L570-L574)</sub>
## `format-table`
``` clojure

(format-table {:keys [rows indent]})
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L526-L537)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L530-L541)</sub>
## `merge-opts`
``` clojure

Expand All @@ -127,21 +122,21 @@ Merges babashka CLI options.
(opts->table {:keys [spec order]})
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L547-L564)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L551-L568)</sub>
## `pad`
``` clojure

(pad len s)
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L516-L516)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L520-L520)</sub>
## `pad-cells`
``` clojure

(pad-cells rows)
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L518-L524)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L522-L528)</sub>
## `parse-args`
``` clojure

Expand All @@ -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.
<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L494-L501)</sub>
<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L498-L505)</sub>
## `parse-cmds`
``` clojure

Expand Down Expand Up @@ -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
```

<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L259-L492)</sub>
<br><sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L259-L496)</sub>
## `rows`
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L540-L542)</sub>
<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli.cljc#L544-L546)</sub>
## `spec->opts`
``` clojure

Expand Down Expand Up @@ -257,17 +252,3 @@ Main entrypoint for command line usage.
```

<sub>[source](https://github.com/babashka/cli/blob/main/src/babashka/cli/exec.clj#L83-L86)</sub>
# user





## `global-spec`
<sub>[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L3-L3)</sub>
## `sub1-spec`
<sub>[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L4-L4)</sub>
## `sub2-spec`
<sub>[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L5-L5)</sub>
## `table`
<sub>[source](https://github.com/babashka/cli/blob/main/src/scratch.clj#L17-L19)</sub>
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion version.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{:major 0, :minor 8, :release 56}
{:major 0, :minor 8, :release 57}

0 comments on commit 1e4ead0

Please sign in to comment.