From 4dc1ec88748c9af791f9c5c911a8152806c805a9 Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Sat, 5 Oct 2019 10:49:31 -0700 Subject: [PATCH] vere: Wrap tank dump priority escape codes with terminal check --- pkg/urbit/vere/pier.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkg/urbit/vere/pier.c b/pkg/urbit/vere/pier.c index 1d5db4bfe1..6fe4a1c711 100644 --- a/pkg/urbit/vere/pier.c +++ b/pkg/urbit/vere/pier.c @@ -2038,10 +2038,19 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac) fil_u = stderr; } - switch ( pri_w ) { - case 3: fprintf(fil_u, "\033[31m>>> "); break; - case 2: fprintf(fil_u, "\033[33m>> "); break; - case 1: fprintf(fil_u, "\033[32m> "); break; + if ( c3n == u3_Host.ops_u.tem ) { + switch ( pri_w ) { + case 3: fprintf(fil_u, "\033[31m>>> "); break; + case 2: fprintf(fil_u, "\033[33m>> "); break; + case 1: fprintf(fil_u, "\033[32m> "); break; + } + } + else { + switch ( pri_w ) { + case 3: fprintf(fil_u, ">>> "); break; + case 2: fprintf(fil_u, ">> "); break; + case 1: fprintf(fil_u, "> "); break; + } } // if we have no arvo kernel and can't evaluate nock @@ -2062,7 +2071,10 @@ u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac) _pier_wall(fil_u, wol); } - fprintf(fil_u, "\033[0m"); + if ( c3n == u3_Host.ops_u.tem ) { + fprintf(fil_u, "\033[0m"); + } + u3_term_io_loja(0); u3z(blu); u3z(tac);