~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'ponder/master'
[profile]
/
bashrc
diff --git
a/bashrc
b/bashrc
index
3197bae
..
7f4cd74
100644
(file)
--- 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"
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
if [ -t 1 ]; then
- command grep ${GREP_COLORS+--color=auto} "$@"
+ command
$
grep ${GREP_COLORS+--color=auto} "$@"
else
else
- command grep "$@"
+ command
$
grep "$@"
fi
}
fi
}
+alias grep="greplike grep"
+alias egrep="greplike egrep"
+alias fgrep="greplike fgrep"
# --- Set up some simple aliases ---
# --- Set up some simple aliases ---