]> granicus.if.org Git - procps-ng/commitdiff
If you use echo -e $(put sgr0)"text" - reset color attributes, it turns out the artif...
authorAlexandr Miasnikov <amiasnikov@mail.ru>
Fri, 27 Apr 2018 13:27:17 +0000 (13:27 +0000)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 04:44:29 +0000 (15:44 +1100)
watch.c

diff --git a/watch.c b/watch.c
index 1c49f1eb54ca4dea9672222daff1ae42c1c3350c..82b80736dcf1dc66681b0c358399334ba107c8d5 100644 (file)
--- 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;