projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
46c723f
)
Make ‘egrep’ use the same options as ‘grep’ [Closes: issue1230]
author
Frank Terbeck
<ft@grml.org>
Thu, 27 Mar 2014 12:13:16 +0000
(13:13 +0100)
committer
Frank Terbeck
<ft@grml.org>
Thu, 27 Mar 2014 12:13:16 +0000
(13:13 +0100)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
d032b3e
..
6cd9d24
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-2941,8
+2941,13
@@
modified() {
check_com new || alias new=modified
# use colors when GNU grep with color-support
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
# Translate DE<=>EN
# 'translate' looks up fot a word in a file with language-to-language