Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283574 - sys-apps/grep: grep -i {pattern-with-capital-letter} does not color output
Summary: sys-apps/grep: grep -i {pattern-with-capital-letter} does not color output
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 08:07 UTC by Nikhil Patil
Modified: 2010-03-23 21:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikhil Patil 2009-09-03 08:07:30 UTC
When -i and --color are used together and the pattern contains a capital letter, the output itself is correct, but not colored correctly.

Reproducible: Always

Steps to Reproduce:
$ unset GREP_COLOR  # reset to default
$ unset GREP_COLORS # reset to default
$ export LANG=C

$ echo a |grep --color=always -i a
a  ---> RED :)
$ echo a |grep --color=always -i A
a  ---> NO-COLOR :(
$ echo A |grep --color=always -i A
A  ---> NO-COLOR :(



This bug was:
- present in 2.5.1a-r1,
- not present in 2.5.3-r1,
- but is present again in 2.5.4 and 2.5.4-r1

Seems like an upstream/debian-patch issue, but I am not very sure.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-03 16:38:19 UTC
Setting also LC_ALL=C is sometimes required to reproduce this bug.
Comment 2 SpanKY gentoo-dev 2010-03-23 21:11:25 UTC
seems to be fixed for real with grep-2.6