]> git.eshelyaron.com Git - sweep.git/commitdiff
Emit highlighted messages in the top-level
authorEshel Yaron <me@eshelyaron.com>
Fri, 20 Oct 2023 15:58:47 +0000 (17:58 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 20 Oct 2023 16:06:27 +0000 (18:06 +0200)
* sweep.pl: Ensure 'library(ansi_term)' gets loaded.
(sweep_top_level_client/4): Set the flag 'verbose' to 'normal' in
order to enable informational messages, and set 'color_term' to 'true'
to enable highlighting when using a pty.

sweep.pl

index 220c187dc8cd11c6502b59306ca0ed35c739f9c3..a83816fd178473f349d162dc83ce9be08bc5d026 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
 
 :- use_module(library(pldoc)).
 :- use_module(library(listing)).
+:- use_module(library(ansi_term)).
 :- use_module(library(prolog_source)).
 :- use_module(library(prolog_colour)).
 :- use_module(library(pldoc/doc_process)).
@@ -819,6 +820,8 @@ sweep_top_level_client(InStream, OutStream, ip(127, 0, 0, 1), TC) :-
     set_prolog_IO(InStream, OutStream, OutStream),
     set_stream(InStream, tty(true)),
     set_prolog_flag(tty_control, TC),
+    set_prolog_flag(verbose, normal),
+    set_prolog_flag(color_term, true),
     current_prolog_flag(encoding, Enc),
     set_stream(user_input, encoding(Enc)),
     set_stream(user_output, encoding(Enc)),