mirror of
https://github.com/janet-lang/janet
synced 2025-04-29 22:23:15 +00:00
Address issue #205.
This commit is contained in:
parent
ac85fca8a1
commit
3a14aad615
@ -2138,7 +2138,7 @@
|
|||||||
(if-let [jp (os/getenv "JANET_HEADERPATH")] (setdyn :headerpath jp))
|
(if-let [jp (os/getenv "JANET_HEADERPATH")] (setdyn :headerpath jp))
|
||||||
|
|
||||||
# Flag handlers
|
# Flag handlers
|
||||||
(def handlers :private
|
(def handlers
|
||||||
{"h" (fn [&]
|
{"h" (fn [&]
|
||||||
(print "usage: " (dyn :executable "janet") " [options] script args...")
|
(print "usage: " (dyn :executable "janet") " [options] script args...")
|
||||||
(print
|
(print
|
||||||
@ -2206,7 +2206,7 @@
|
|||||||
(while (< i lenargs)
|
(while (< i lenargs)
|
||||||
(def arg (in args i))
|
(def arg (in args i))
|
||||||
(if (and *handleopts* (= "-" (string/slice arg 0 1)))
|
(if (and *handleopts* (= "-" (string/slice arg 0 1)))
|
||||||
(+= i (dohandler (string/slice arg 1 2) i))
|
(+= i (dohandler (string/slice arg 1) i))
|
||||||
(do
|
(do
|
||||||
(set *no-file* false)
|
(set *no-file* false)
|
||||||
(dofile arg :prefix "" :exit *exit-on-error* :evaluator evaluator)
|
(dofile arg :prefix "" :exit *exit-on-error* :evaluator evaluator)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user