Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7180

Make --color option behave more like BSD/GNU grep's --color option

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.8.2, 4.0.0, 4.0.0-alpha-1
    • Component/s: None
    • Labels:
      None

      Description

      Since MNG-7080 introduced this option we mimic grep's behavior, but not the way grep actually does.

      GNU grep: https://git.savannah.gnu.org/cgit/grep.git/tree/src/grep.c#n2751
      FreeBSD grep: https://github.com/freebsd/freebsd-src/blob/781c3b51193e5bd99773439192ca68fdfdd9c330/usr.bin/grep/grep.c#L576-L596

      • Both make the value for --color optional and default to auto
      • They also accept tty, if-tty, yes, force, none, no

      We should support that approach too: Optional value and privately accepting additional values.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                michael-o Michael Osipov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: