This commit is contained in:
Michiel Borkent 2019-12-08 12:51:19 +01:00
parent c2037c0ed8
commit b735ae62cc
2 changed files with 5 additions and 3 deletions

View file

@ -125,7 +125,7 @@ You may also download a binary from [Github](https://github.com/borkdude/babashk
## Usage
``` shellsession
Usage: bb [ -i | -I ] [ -o | -O ] [ --stream ] ( -e <expression> | -f <file> | --socket-repl [<host>:]<port> )
Usage: bb [ -i | -I ] [ -o | -O ] [--verbose] [ --stream ] ( -e <expression> | -f <file> | --repl | --socket-repl [<host>:]<port> )
Options:
@ -136,9 +136,11 @@ Options:
-I: bind *in* to a lazy seq of EDN values from stdin.
-o: write lines to stdout.
-O: write EDN values to stdout.
--verbose: print entire stacktrace in case of exception.
--stream: stream over lines or EDN values from stdin. Combined with -i or -I *in* becomes a single value per iteration.
-e, --eval <expression>: evaluate an expression
-f, --file <path>: evaluate a file
--repl: start REPL
--socket-repl: start socket REPL. Specify port (e.g. 1666) or host and port separated by colon (e.g. 127.0.0.1:1666).
--time: print execution time before exiting.

View file

@ -110,12 +110,12 @@
(defn print-version []
(println (str "babashka v"(str/trim (slurp (io/resource "BABASHKA_VERSION"))))))
(def usage-string "Usage: bb [ -i | -I ] [ -o | -O ] [--verbose] [ --stream ] ( -e <expression> | -f <file> | --socket-repl [<host>:]<port> )")
(def usage-string "Usage: bb [ -i | -I ] [ -o | -O ] [--verbose] [ --stream ] ( -e <expression> | -f <file> | --repl | --socket-repl [<host>:]<port> )")
(defn print-usage []
(println usage-string))
(defn print-help []
(println (str "babashka v" (str/trim (slurp (io/resource "BABASHKA_VERSION")))))
(println (str "Babashka v" (str/trim (slurp (io/resource "BABASHKA_VERSION")))))
;; (println (str "sci v" (str/trim (slurp (io/resource "SCI_VERSION")))))
(println)
(print-usage)