config color alias for z*grep

This commit is contained in:
rwx403335 2022-06-20 15:05:46 +08:00
parent 433fd79494
commit 570f7a1ba0
3 changed files with 31 additions and 1 deletions

9
colorzgrep.csh Normal file
View File

@ -0,0 +1,9 @@
t -f /usr/libexec/grepconf.sh
if ( $status == 1 ) exit
/usr/libexec/grepconf.sh -c
if ( $status == 1 ) exit
alias zgrep 'zgrep --color=auto'
alias zfgrep 'zfgrep --color=auto'
alias zegrep 'zegrep --color=auto'

6
colorzgrep.sh Normal file
View File

@ -0,0 +1,6 @@
[ -f /usr/libexec/grepconf.sh ] || return
/usr/libexec/grepconf.sh -c || return
alias zgrep='zgrep --color=auto' 2>/dev/null
alias zfgrep='zfgrep --color=auto' 2>/dev/null
alias zegrep='zegrep --color=auto' 2>/dev/null

View File

@ -1,11 +1,13 @@
Name: gzip Name: gzip
Version: 1.11 Version: 1.11
Release: 4 Release: 5
Summary: A data compression utility Summary: A data compression utility
License: GPLv3 License: GPLv3
URL: https://www.gnu.org/software/gzip URL: https://www.gnu.org/software/gzip
Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz
Source1: colorzgrep.csh
Source2: colorzgrep.sh
Patch6000: gzip-l-now-outputs-accurate-size.patch Patch6000: gzip-l-now-outputs-accurate-size.patch
Patch6001: doc-document-gzip-l-change.patch Patch6001: doc-document-gzip-l-change.patch
@ -51,6 +53,12 @@ rm -rf %RPM_BUILD_ROOT
# ncompress provides uncompress, may cause conflict. # ncompress provides uncompress, may cause conflict.
rm -f %{buildroot}%{_bindir}/uncompress rm -f %{buildroot}%{_bindir}/uncompress
# config color alias for z*grep
%global profiledir %{_sysconfdir}/profile.d
mkdir -p %{buildroot}%{profiledir}
install -p -m 644 %{SOURCE1} %{buildroot}%{profiledir}
install -p -m 644 %{SOURCE2} %{buildroot}%{profiledir}
%check %check
make check make check
@ -59,6 +67,7 @@ make check
%doc AUTHORS ChangeLog README %doc AUTHORS ChangeLog README
%license COPYING %license COPYING
%{_bindir}/* %{_bindir}/*
%{profiledir}/*
%exclude %{_infodir}/dir %exclude %{_infodir}/dir
%files help %files help
@ -67,6 +76,12 @@ make check
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Mon Jun 20 2022 renhognxun <renhongxun@h-partners.com> - 1.11-5
- Type:enhancement
- ID:NA
- SUG:NA
- config color alias for z*grep
* Fri Apr 22 2022 shixuantong <shixuantong@h-partners.com> - 1.11-4 * Fri Apr 22 2022 shixuantong <shixuantong@h-partners.com> - 1.11-4
- Type:cves - Type:cves
- ID:CVE-2022-1271 - ID:CVE-2022-1271