From e7c3c0279fdb5233759c97ce915ca5a6d3c26d44 Mon Sep 17 00:00:00 2001 From: Alexandr Miasnikov Date: Fri, 27 Apr 2018 13:27:17 +0000 Subject: [PATCH] If you use echo -e $(put sgr0)"text" - reset color attributes, it turns out the artifact (Btext --- watch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/watch.c b/watch.c index 1c49f1eb..82b80736 100644 --- a/watch.c +++ b/watch.c @@ -290,6 +290,11 @@ static void process_ansi(FILE * fp) int ansi_attribute; c = getc(fp); + + if (c == '(') { + c = getc(fp); + c = getc(fp); + } if (c != '[') { ungetc(c, fp); return;