Summary: | app-shells/bash - /etc/bash/bashrc should use GREP_OPTIONS to set *grep --color | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dave Kemper <saint.snit> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | alexander |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dave Kemper
2012-09-06 23:41:01 UTC
i'm a bit hesitant for fear of breaking scripts and general environment pollution. aliases are good because they don't leak out of the active env. Default behavior among the flavors of grep should be consistent. Having /etc/bash/bashrc alias all three standard greps is a reasonable way to achieve this. (My original Summary line for this bug said merely that bashrc "handles greps inconsistently." I don't know why Jeroen changed it; the GREP_OPTIONS idea was merely a suggested fix, not part of the bug description.) Setting GREP_OPTIONS seemed cleaner to me, but I didn't consider its effect on scripts. Still, I'd expect the effect to be minimal, as *grep's --colour=auto option only adds the color-producing escape sequences when output is a terminal. (In reply to comment #2) i'm not disagreeing on consistent behavior. just debating adding more aliases or going with the env var. should be all set now in the tree; thanks for the report! Commit message: Add egrep/fgrep colour aliases too http://sources.gentoo.org/app-shells/bash/files/bashrc?r1=1.20&r2=1.21 |