From: Alexandr Miasnikov Date: Fri, 27 Apr 2018 13:27:17 +0000 (+0000) Subject: If you use echo -e $(put sgr0)"text" - reset color attributes, it turns out the artif... X-Git-Tag: v4.0.0~269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7c3c0279fdb5233759c97ce915ca5a6d3c26d44;p=procps-ng If you use echo -e $(put sgr0)"text" - reset color attributes, it turns out the artifact (Btext --- 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;