diff --git a/sci b/sci index 641a1d94..3f448903 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 641a1d943d8df4f7ffdf0f243dcda0ad54f7bad5 +Subproject commit 3f448903550feaeb7d752c958f6422a5fde667f7 diff --git a/src/babashka/impl/repl.clj b/src/babashka/impl/repl.clj index cf21ed85..e83f56de 100644 --- a/src/babashka/impl/repl.clj +++ b/src/babashka/impl/repl.clj @@ -7,6 +7,7 @@ [clojure.tools.reader.reader-types :as r] [sci.impl.interpreter :refer [eval-form]] [sci.impl.parser :as parser] + [sci.impl.vars :as vars] [sci.core :as sci] [sci.impl.io :as sio])) @@ -58,7 +59,7 @@ expr)] ret))) :need-prompt (or need-prompt (fn [] true)) - :prompt (or prompt #(sio/printf "%s=> " (-> sci-ctx :env deref :current-ns))) + :prompt (or prompt #(sio/printf "%s=> " (vars/current-ns-name))) :flush (or flush sio/flush) :print (or print sio/prn) :caught (or caught repl-caught))))) diff --git a/test/babashka/impl/repl_test.clj b/test/babashka/impl/repl_test.clj index d0f1bc5b..3c9cb72f 100644 --- a/test/babashka/impl/repl_test.clj +++ b/test/babashka/impl/repl_test.clj @@ -14,9 +14,10 @@ (vars/bindRoot sci/err *err*) (defn repl! [] - (start-repl! (init {:bindings {'*command-line-args* - ["a" "b" "c"]} - :env (atom {})}))) + (sci/with-bindings {vars/current-ns (vars/->SciNamespace 'user)} + (start-repl! (init {:bindings {'*command-line-args* + ["a" "b" "c"]} + :env (atom {})})))) (defn assert-repl [expr expected] (is (str/includes? (sci/with-out-str