• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ansicolor-plugin
    • None

      tput is a utility frequently used to set the terminal colors (if TERM is set to xterm).

      echo "$(tput setaf 3)highlight $(tput sgr0)normal"

      ansicolor works as expected here, too, however, when using $(tput sgr0) to reset the font properties, ansicolor leaves a "(B" visible.

      So the output when using ansicolor looks like:
      highlight normal(B

      I assume that's a part of the control sequence that ansicolor doesn't yet know about.

          [JENKINS-24387] Support parsing output of $(tput sgr0)

          Daniel Beck added a comment -

          Full output of the command is ^[(B^[[m

          Daniel Beck added a comment - Full output of the command is ^[(B^[[m

          Daniel Beck added a comment -

          Filed with the jansi project as https://github.com/fusesource/jansi/issues/29

          Daniel Beck added a comment - Filed with the jansi project as https://github.com/fusesource/jansi/issues/29

          FYI this now appears to be fixed

          Adrian Bridgett added a comment - FYI this now appears to be fixed

          Philipp Hahn added a comment -

          I still see (B with Jenkins ver. 2.46.2 and AnsiColor Plugin 0.5.0 on Linux with TERM=xterm using pipeline workflows

          Philipp Hahn added a comment - I still see (B with Jenkins ver. 2.46.2 and AnsiColor Plugin 0.5.0 on Linux with TERM=xterm using pipeline workflows

          Daniel Beck added a comment -

          pmhahn To clarify, it's not an issue with jANSI, but with the Jenkins plugin? Or did you just choose to fix it there?

          Daniel Beck added a comment - pmhahn To clarify, it's not an issue with jANSI, but with the Jenkins plugin? Or did you just choose to fix it there?

          Philipp Hahn added a comment -

          danielbeck: I don't know jANSI; I guesst its some ANSI escape sequence library for Java.

          I fixed the "bug" in the "AnsiColor Plugin". See me Pull Request 111with patch and test. That removes the (B in output.

          Philipp Hahn added a comment - danielbeck : I don't know jANSI; I guesst its some ANSI escape sequence library for Java. I fixed the "bug" in the "AnsiColor Plugin". See me Pull Request 111 with patch and test. That removes the (B in output.

          Daniel Beck added a comment -

          pmhahn Right, forgot this was just copied over, PR discussion explains what I was referring to.

          Daniel Beck added a comment - pmhahn Right, forgot this was just copied over, PR discussion explains what I was referring to.

          Christian Höltje added a comment - - edited

          Since adding PR #132 this issue now becomes very important because each line isn't reset.

          Now colors are bleeding into other lines.

          A good example is Cucumber, where text that was previously default/reset becomes red after an error. You can see [0m in the output of the error message.

          Christian Höltje added a comment - - edited Since adding PR #132 this issue now becomes very important because each line isn't reset. Now colors are bleeding into other lines. A good example is Cucumber, where text that was previously default/reset becomes red after an error. You can see [0m in the output of the error message.

          Hmm... My issue may be JENKINS-34019 instead. [0m (setaf 0) is not the same as [m (setgr0).

          Christian Höltje added a comment - Hmm... My issue may be JENKINS-34019 instead. [0m ( setaf 0 ) is not the same as [m ( setgr0 ).

          Vlad Aginsky added a comment -

          raised to major, hopefully to get attention. 

          Vlad Aginsky added a comment - raised to major, hopefully to get attention. 

            Unassigned Unassigned
            nschum Nikolaj Schumacher
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: