colorgrep scripts no longer overwrites COLORS envvar (#693058),
thanks to Ville Skyttä
This commit is contained in:
parent
a87b64c478
commit
e3c2632c3e
@ -1,11 +1,8 @@
|
||||
#! /bin/csh -f
|
||||
|
||||
# color-grep initialization
|
||||
|
||||
set COLORS=/etc/GREP_COLORS
|
||||
|
||||
if ( -e "$COLORS" ) then
|
||||
set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
|
||||
if ( -r /etc/GREP_COLORS ) then
|
||||
set color_none=`sed -n '/^COLOR.*none/Ip' < /etc/GREP_COLORS`
|
||||
if ( "$color_none" != '' ) then
|
||||
unset color_none
|
||||
exit
|
||||
|
@ -3,12 +3,8 @@
|
||||
# Skip the rest for noninteractive shells.
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
COLORS=
|
||||
|
||||
[ -e "/etc/GREP_COLORS" ] && COLORS="/etc/GREP_COLORS"
|
||||
|
||||
if [ -n "$COLORS" ]; then
|
||||
grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
if [ -r /etc/GREP_COLORS ]; then
|
||||
grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
alias grep='grep --color=auto' 2>/dev/null
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: Pattern matching utilities
|
||||
Name: grep
|
||||
Version: 2.7
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Text
|
||||
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
|
||||
@ -69,6 +69,10 @@ fi
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 04 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7-5
|
||||
- colorgrep scripts no longer overwrites COLORS envvar (#693058),
|
||||
thanks to Ville Skyttä
|
||||
|
||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user