BTS

Issue1230

Title grep --color=auto
Priority bug Status resolved
Superseder Nosy List vasyapupkin.1986
Assigned To Topics

Created on 2013-02-03.09:15:24 by vasyapupkin.1986, last changed 2014-04-19.13:53:29 by mika.

Files
File name Uploaded Type Edit Remove
unnamed vasyapupkin.1986, 2013-02-03.09:15:24 text/html
Messages
msg4791 (view) Author: mika Date: 2014-04-19.13:53:29
We believe that your issue has been closed by the upload of
Version 0.9.4 of grml-etc-core from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 19 Apr 2014 15:44:35 +0200
Source: grml-etc-core
Binary: grml-etc-core
Architecture: source all
Version: 0.9.4
Distribution: grml-testing
Urgency: medium
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description: 
 grml-etc-core - core etcetera files for the grml system
Changes: 
 grml-etc-core (0.9.4) grml-testing; urgency=medium
 .
   [ Erik Bernstein ]
   * [46c723f] zshrc: introduce variable for the compdump file
     [Closes: issue1275]
 .
   [ Frank Terbeck ]
   * [5afe1a2] Make ‘egrep’ use the same options as ‘grep’
     [Closes: issue1230]
   * [1317ff5] zshrc: Make options of gpasswd complete via _gnu_generic
Checksums-Sha1: 
 c8546d4e1d643a21d343e98aa60d274fa6e8e1ac 928 grml-etc-core_0.9.4.dsc
 bb8b2177a97afc0299a92363d75d4d18d9e992f6 152261 grml-etc-core_0.9.4.tar.gz
 aeb526a56ddeb7225e06d2fd8d21157357e51588 139792 grml-etc-core_0.9.4_all.deb
Checksums-Sha256: 
 191f5173ec55ad38d39628308f94662886adf40552cd946dfb41649a8c94fb30 928 grml-etc-core_0.9.4.dsc
 7b4408cce3ae50805c106fddaeac589dc719fecae91b143a2f2fbf7b4c917840 152261 grml-etc-core_0.9.4.tar.gz
 7598d2b3a7d9e0e8cab91b4d001808018333b18d1614d1719e9cd51848ba77ea 139792 grml-etc-core_0.9.4_all.deb
Files: 
 89183aa7ce643fa4fb6d2d20d469d378 928 grml optional grml-etc-core_0.9.4.dsc
 3109075ee1cc445079582a2377adc757 152261 grml optional grml-etc-core_0.9.4.tar.gz
 9329a0777477cfc404a3192760d9ddef 139792 grml optional grml-etc-core_0.9.4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlNSfh4ACgkQ2N9T+zficujXhgCeObs13lA5pExzic3CUC44Poh2
1EgAn0s6lnRjINl6nEvRr7ZVu/S/+2Yj
=AYHG
-----END PGP SIGNATURE-----
msg4628 (view) Author: mika Date: 2013-09-25.11:01:16
Hey, I'd like to close this bug report. Do we want to apply the patch as it is?
msg4508 (view) Author: ft Date: 2013-02-04.22:14:27
Right. How about this patch?


diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc
index 50fac90..61fd010 100644
--- a/etc/zsh/zshrc
+++ b/etc/zsh/zshrc
@@ -2412,8 +2412,13 @@ modified() {
 check_com new || alias new=modified
 
 # use colors when GNU grep with color-support
-#a2# Execute \kbd{grep -{}-color=auto}
-(( $#grep_options > 0 )) && alias grep='grep '${grep_options:+"${grep_options[*]}"}
+if (( $#grep_options > 0 )); then
+    o=${grep_options:+"${grep_options[*]}"}
+    #a2# Execute \kbd{grep -{}-color=auto}
+    alias grep='grep '$o
+    alias egrep='egrep '$o
+    unset o
+fi
 
 # Translate DE<=>EN
 # 'translate' looks up fot a word in a file with language-to-language


-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg4497 (view) Author: vasyapupkin.1986 Date: 2013-02-03.09:15:24
Hello.

_grep --color=auto_ dont work with _egrep_
I fixed it with string:
(( $#grep_options > 0 )) && alias egrep='egrep 
'${grep_options:+"${grep_options[*]}"}

after that colors work normally with egrep.
History
Date User Action Args
2014-04-19 13:53:29mikasetstatus: fixed-in-git -> resolved
messages: + msg4791
2014-03-27 12:14:43ftsetstatus: need-eg -> fixed-in-git
2013-09-25 11:01:16mikasetstatus: chatting -> need-eg
messages: + msg4628
2013-02-04 22:14:27ftsetstatus: unread -> chatting
messages: + msg4508
title: Bug grep --color=auto -> grep --color=auto
2013-02-04 13:10:50mikasetpriority: bug
2013-02-03 09:15:24vasyapupkin.1986create