README
This commit is contained in:
parent
c2037c0ed8
commit
b735ae62cc
2 changed files with 5 additions and 3 deletions
|
|
@ -125,7 +125,7 @@ You may also download a binary from [Github](https://github.com/borkdude/babashk
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
``` shellsession
|
``` 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:
|
Options:
|
||||||
|
|
||||||
|
|
@ -136,9 +136,11 @@ Options:
|
||||||
-I: bind *in* to a lazy seq of EDN values from stdin.
|
-I: bind *in* to a lazy seq of EDN values from stdin.
|
||||||
-o: write lines to stdout.
|
-o: write lines to stdout.
|
||||||
-O: write EDN values 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.
|
--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
|
-e, --eval <expression>: evaluate an expression
|
||||||
-f, --file <path>: evaluate a file
|
-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).
|
--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.
|
--time: print execution time before exiting.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,12 +110,12 @@
|
||||||
(defn print-version []
|
(defn print-version []
|
||||||
(println (str "babashka v"(str/trim (slurp (io/resource "BABASHKA_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 []
|
(defn print-usage []
|
||||||
(println usage-string))
|
(println usage-string))
|
||||||
|
|
||||||
(defn print-help []
|
(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 (str "sci v" (str/trim (slurp (io/resource "SCI_VERSION")))))
|
||||||
(println)
|
(println)
|
||||||
(print-usage)
|
(print-usage)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue