From b9d170e40336e99ba58265327476974c539c1ee9 Mon Sep 17 00:00:00 2001
From: Sorin Ionescu <sorin.ionescu@gmail.com>
Date: Mon, 24 Nov 2014 13:05:34 -0500
Subject: [PATCH] [Fix #732] Replace $GREP_OPTIONS with an alias

---
 modules/environment/init.zsh | 9 ---------
 modules/utility/init.zsh     | 6 ++++++
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh
index 51d26162f5..76655a6c7e 100644
--- a/modules/environment/init.zsh
+++ b/modules/environment/init.zsh
@@ -33,15 +33,6 @@ unsetopt BG_NICE          # Don't run all background jobs at a lower priority.
 unsetopt HUP              # Don't kill jobs on shell exit.
 unsetopt CHECK_JOBS       # Don't report on jobs when shell exit.
 
-#
-# Grep
-#
-
-if zstyle -t ':prezto:environment:grep' color; then
-  export GREP_COLOR='37;45'
-  export GREP_OPTIONS='--color=auto'
-fi
-
 #
 # Termcap
 #
diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh
index 102ae5a1b9..c9ef94d180 100644
--- a/modules/utility/init.zsh
+++ b/modules/utility/init.zsh
@@ -102,6 +102,12 @@ alias lc='lt -c'         # Lists sorted by date, most recent last, shows change
 alias lu='lt -u'         # Lists sorted by date, most recent last, shows access time.
 alias sl='ls'            # I often screw this up.
 
+# Grep
+if zstyle -t ':prezto:module:utility:grep' color; then
+  export GREP_COLOR='37;45'
+  alias grep="$aliases[grep] --color=auto"
+fi
+
 # Mac OS X Everywhere
 if [[ "$OSTYPE" == darwin* ]]; then
   alias o='open'