Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 849803 Details for
Bug 1034631
[RFE] If grep is colored, *z*grep should be as well
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Possible approach with dedicated script.
grep.patch (text/plain), 2.41 KB, created by
Pavel Raiskup
on 2014-01-14 08:46:40 UTC
(
hide
)
Description:
Possible approach with dedicated script.
Filename:
MIME Type:
Creator:
Pavel Raiskup
Created:
2014-01-14 08:46:40 UTC
Size:
2.41 KB
patch
obsolete
>diff --git a/colorgrep.csh b/colorgrep.csh >index 0b76c97..87e0582 100644 >--- a/colorgrep.csh >+++ b/colorgrep.csh >@@ -1,14 +1,8 @@ > > # color-grep initialization > >-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 >- endif >- unset color_none >-endif >+/usr/libexec/grepconf.sh --interactive-color >+if ( $status == 1 ) exit > > alias grep 'grep --color=auto' > alias egrep 'egrep --color=auto' >diff --git a/colorgrep.sh b/colorgrep.sh >index 57f7aba..00b22fb 100644 >--- a/colorgrep.sh >+++ b/colorgrep.sh >@@ -1,8 +1,7 @@ > # color-grep initialization > >-if [ -r /etc/GREP_COLORS ]; then >- grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null && return >-fi >+/usr/libexec/grepconf.sh --interactive-color >+test $? -eq 1 && return > > alias grep='grep --color=auto' 2>/dev/null > alias egrep='egrep --color=auto' 2>/dev/null >diff --git a/grep.spec b/grep.spec >index 90a0fab..8528019 100644 >--- a/grep.spec >+++ b/grep.spec >@@ -3,13 +3,15 @@ > Summary: Pattern matching utilities > Name: grep > Version: 2.16 >-Release: 1%{?dist} >+Release: 1.1%{?dist} > License: GPLv3+ > Group: Applications/Text > Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz > Source1: colorgrep.sh > Source2: colorgrep.csh > Source3: GREP_COLORS >+Source4: grepconf.sh >+ > # upstream ticket 39444 > Patch0: grep-2.16-man-fix-gs.patch > # upstream ticket 39445 >@@ -57,6 +59,8 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir > mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d > install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d > install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir} >+mkdir -p $RPM_BUILD_ROOT%{_libexecdir} >+install -pm 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir} > > %find_lang %name > >@@ -83,6 +87,7 @@ fi > %config(noreplace) %{_sysconfdir}/GREP_COLORS > %{_infodir}/*.info*.gz > %{_mandir}/*/* >+%{_libexecdir}/grepconf.sh > > %changelog > * Thu Jan 2 2014 Jaroslav Å karvada <jskarvad@redhat.com> - 2.16-1 >diff --git a/grepconf.sh b/grepconf.sh >new file mode 100644 >index 0000000..3dd1a86 >--- /dev/null >+++ b/grepconf.sh >@@ -0,0 +1,12 @@ >+#!/bin/sh >+ >+if test "$#" -eq 0; then >+ echo >&2 "No option passed, so far only --interactive-color supported" >+ exit 1 >+fi >+ >+if test x"$1" == x"--interactive-color"; then >+ grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null >+ test $? -eq 0 && exit 1 >+ exit 0 >+fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1034631
:
829314
|
829316
|
849803
|
849812
|
928783