1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-11 19:18:07 +00:00

Add Q and q formatters to buffer/format.

These are similar to P and p, but print values
on a single line for a much more compact version.
This commit is contained in:
Calvin Rose
2019-08-24 22:53:45 -04:00
parent 77870508de
commit 060d11e4c2
5 changed files with 16 additions and 4 deletions

View File

@@ -91,6 +91,6 @@
(defn getchunk [buf p]
(getter (prompter p) buf))
(def onsig (if *quiet* (fn [x &] x) nil))
(setdyn :pretty-format (if *colorize* "%.20P" "%.20p"))
(setdyn :pretty-format (if *colorize* "%.20Q" "%.20q"))
(setdyn :err-color (if *colorize* true))
(repl getchunk onsig)))