From 5afe1a231d01ccbdfb747c397f760eb936004814 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Thu, 27 Mar 2014 13:13:16 +0100 Subject: [PATCH] =?utf8?q?Make=20=E2=80=98egrep=E2=80=99=20use=20the=20sam?= =?utf8?q?e=20options=20as=20=E2=80=98grep=E2=80=99=20[Closes:=20issue1230?= =?utf8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- etc/zsh/zshrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index d032b3e..6cd9d24 100644 --- 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 -#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 -- 2.1.4