From 004beb573d8f7434fa42f3eafdf2fd1af0bbcfd7 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 9 Jan 2009 15:19:39 +0000 Subject: [PATCH] bashrc: Add aliases for egrep and fgrep. These got missed out, unfortunately. --- bashrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bashrc b/bashrc index 3197bae..7f4cd74 100644 --- a/bashrc +++ b/bashrc @@ -116,13 +116,17 @@ ls () { export GREP_COLORS="mt=01;31:ms=01;31:mc=031;31:fn=36:ln=36:bn=36:se=34" -grep () { +greplike () { + declare grep=$1; shift if [ -t 1 ]; then - command grep ${GREP_COLORS+--color=auto} "$@" + command $grep ${GREP_COLORS+--color=auto} "$@" else - command grep "$@" + command $grep "$@" fi } +alias grep="greplike grep" +alias egrep="greplike egrep" +alias fgrep="greplike fgrep" # --- Set up some simple aliases --- -- 2.11.0