From 2afd7726e2e5abc3c2ba4073e70819222503d043 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 18 Aug 2019 12:44:51 +0200 Subject: [PATCH] doc --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c26a376b..c63a9746 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,20 @@ A sprinkle of Clojure for the command line. ## Quickstart ``` shellsession +## install bb $ bash <(curl -s https://raw.githubusercontent.com/borkdude/babashka/master/install) -$ bb '(vec (dedupe *in*))' <<< '[1 1 1 1 2]' -[1 2] + +## 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 -i '(filter directory? *in*)' +("doc" "resources" "sci" "script" "src" "target" "test") ``` ## Rationale