mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-27 03:05:39 +01:00
Merge 4e49c31935 into 0222e77497
This commit is contained in:
commit
a58d3196c0
1 changed files with 4 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
# Examples: http://rubyurl.com/ZXv
|
# Examples: http://rubyurl.com/ZXv
|
||||||
#
|
#
|
||||||
|
|
||||||
GREP_OPTIONS="--color=auto"
|
OPTIONS_GREP="--color=auto"
|
||||||
|
|
||||||
# avoid VCS folders (if the necessary grep flags are available)
|
# avoid VCS folders (if the necessary grep flags are available)
|
||||||
grep-flag-available() {
|
grep-flag-available() {
|
||||||
|
|
@ -11,14 +11,14 @@ grep-flag-available() {
|
||||||
}
|
}
|
||||||
if grep-flag-available --exclude-dir=.cvs; then
|
if grep-flag-available --exclude-dir=.cvs; then
|
||||||
for PATTERN in .cvs .git .hg .svn; do
|
for PATTERN in .cvs .git .hg .svn; do
|
||||||
GREP_OPTIONS+=" --exclude-dir=$PATTERN"
|
OPTIONS_GREP+=" --exclude-dir=$PATTERN"
|
||||||
done
|
done
|
||||||
elif grep-flag-available --exclude=.cvs; then
|
elif grep-flag-available --exclude=.cvs; then
|
||||||
for PATTERN in .cvs .git .hg .svn; do
|
for PATTERN in .cvs .git .hg .svn; do
|
||||||
GREP_OPTIONS+=" --exclude=$PATTERN"
|
OPTIONS_GREP+=" --exclude=$PATTERN"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
unfunction grep-flag-available
|
unfunction grep-flag-available
|
||||||
|
|
||||||
export GREP_OPTIONS="$GREP_OPTIONS"
|
alias grep="grep $OPTIONS_GREP"
|
||||||
export GREP_COLOR='1;32'
|
export GREP_COLOR='1;32'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue