Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
a8ed1c4e
Commit
a8ed1c4e
authored
Nov 30, 2018
by
Shi Yan
Committed by
Marc Cornellà
Mar 01, 2020
Browse files
Ignore .tox folder in grep
parent
b4b50f20
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/grep.zsh
View file @
a8ed1c4e
...
@@ -11,7 +11,7 @@ if grep-flag-available --color=auto; then
...
@@ -11,7 +11,7 @@ if grep-flag-available --color=auto; then
fi
fi
# ignore these folders (if the necessary grep flags are available)
# ignore these folders (if the necessary grep flags are available)
EXC_FOLDERS
=
"{.bzr,CVS,.git,.hg,.svn,.idea}"
EXC_FOLDERS
=
"{.bzr,CVS,.git,.hg,.svn,.idea
,.tox
}"
if
grep-flag-available
--exclude-dir
=
.cvs
;
then
if
grep-flag-available
--exclude-dir
=
.cvs
;
then
GREP_OPTIONS+
=
" --exclude-dir=
$EXC_FOLDERS
"
GREP_OPTIONS+
=
" --exclude-dir=
$EXC_FOLDERS
"
...
@@ -25,6 +25,5 @@ alias egrep="egrep $GREP_OPTIONS"
...
@@ -25,6 +25,5 @@ alias egrep="egrep $GREP_OPTIONS"
alias
fgrep
=
"fgrep
$GREP_OPTIONS
"
alias
fgrep
=
"fgrep
$GREP_OPTIONS
"
# clean up
# clean up
unset
GREP_OPTIONS
unset
GREP_OPTIONS EXC_FOLDERS
unset
EXC_FOLDERS
unfunction grep-flag-available
unfunction grep-flag-available
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment