[issue1230] grep --color=auto
Frank Terbeck
bts at bts.grml.org
Mon Feb 4 23:14:27 CET 2013
Frank Terbeck <ft at grml.org> added the comment:
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
----------
files: unnamed
messages: 4497, 4508
nosy: vasyapupkin.1986
priority: bug
status: chatting
title: grep --color=auto
_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue1230>
_____________________________________
More information about the Bugs-changes
mailing list