1
0
mirror of https://github.com/janet-lang/janet synced 2026-01-13 10:22:41 +00:00

Revert "Reworking coloring logic for repl and CLI interface."

This reverts commit 10954fe0d7.
This commit is contained in:
Calvin Rose
2026-01-10 13:20:02 -06:00
parent 10954fe0d7
commit 15cea60589
2 changed files with 8 additions and 13 deletions

View File

@@ -3093,7 +3093,7 @@
(os/exit 1))
(put env :exit true)
(def buf @"")
(with-dyns [*err* buf]
(with-dyns [*err* buf *err-color* false]
(bad-parse x y))
(set exit-error (string/slice buf 0 -2)))
(defn bc [&opt x y z a b]
@@ -3102,7 +3102,7 @@
(os/exit 1))
(put env :exit true)
(def buf @"")
(with-dyns [*err* buf]
(with-dyns [*err* buf *err-color* false]
(bad-compile x nil z a b))
(set exit-error (string/slice buf 0 -2))
(set exit-fiber y))
@@ -4837,9 +4837,6 @@
(put env *args* subargs)
(put env *lint-error* error-level)
(put env *lint-warn* warn-level)
(put env *pretty-format* (if colorize "%.20Q" "%.20q"))
(put env *err-color* (if colorize true))
(put env *doc-color* (if colorize true))
(when debug-flag
(put env *debug* true)
(put env *redef* true))
@@ -4849,9 +4846,6 @@
(put env *args* subargs)
(put env *lint-error* error-level)
(put env *lint-warn* warn-level)
(put env *pretty-format* (if colorize "%.20Q" "%.20q"))
(put env *err-color* (if colorize true))
(put env *doc-color* (if colorize true))
(when debug-flag
(put env *debug* true)
(put env *redef* true))
@@ -4884,11 +4878,11 @@
(def getter (if raw-stdin getstdin getline))
(defn getchunk [buf p]
(getter (getprompt p) buf env))
(put env *pretty-format* (if colorize "%.20Q" "%.20q"))
(put env *err-color* (if colorize true))
(put env *doc-color* (if colorize true))
(put env *lint-error* error-level)
(put env *lint-warn* warn-level)
(setdyn *pretty-format* (if colorize "%.20Q" "%.20q"))
(setdyn *err-color* (if colorize true))
(setdyn *doc-color* (if colorize true))
(setdyn *lint-error* error-level)
(setdyn *lint-warn* warn-level)
(when-let [profile.janet (dyn *profilepath*)]
(dofile profile.janet :exit true :env env)
(put env *current-file* nil))

View File

@@ -76,3 +76,4 @@
10)
(end-suite)