This commit is contained in:
Michiel Borkent 2019-08-18 23:17:20 +02:00
parent 7303229b6a
commit 8ac9c74da0

View file

@ -9,21 +9,10 @@ A sprinkle of Clojure for the command line.
## Quickstart ## Quickstart
``` shellsession ``` shellsession
## install bb
$ bash <(curl -s https://raw.githubusercontent.com/borkdude/babashka/master/install) $ bash <(curl -s https://raw.githubusercontent.com/borkdude/babashka/master/install)
$ ls | bb --time -i '(filter #(-> % io/file .isDirectory) *in*)'
## optional: define some helper functions
$ cat ~/.babashka/prelude.clj
(defn directory? [f]
(.isDirectory (io/file f)))
## optional: make helper functions available in current shell
$ export BABASHKA_PRELOADS="(load-file \"$HOME/.babashka/prelude.clj\")"
## enjoy!
$ ls | bb --time -i '(filter directory? *in*)'
("doc" "resources" "sci" "script" "src" "target" "test") ("doc" "resources" "sci" "script" "src" "target" "test")
bb took 6ms. bb took 4ms.
``` ```
## Rationale ## Rationale