Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4511

grep leaves around Ansi reset char sequence

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.5
    • Fix Version/s: 4.1.0, 4.0.6
    • Component/s: karaf
    • Labels:
      None

      Description

      grep command, injects an Ansi char sequence to close the markup/highlighting of the found token.

      It shouldn't do it when the command is invoked with the --color never flag.

      The current erroneous behavior, produces this output:

      echo abc | grep --color never
      abXc
      

      where X is the Ansi reset sequence, injected here:

      https://github.com/jboss-fuse/karaf/blob/2e2b9324d4a65076b119239edc8920185914dc60/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/GrepAction.java#L144

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                paolo.antinori Paolo Antinori
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: