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
b6f2cfdb
Commit
b6f2cfdb
authored
May 12, 2016
by
Vital Kolas
Committed by
Marc Cornellà
Mar 01, 2020
Browse files
Exclude .idea folder from grep search scope
parent
498cd722
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/grep.zsh
View file @
b6f2cfdb
...
...
@@ -10,13 +10,13 @@ if grep-flag-available --color=auto; then
GREP_OPTIONS+
=
" --color=auto"
fi
# ignore
VCS
folders (if the necessary grep flags are available)
VCS
_FOLDERS
=
"{.bzr,CVS,.git,.hg,.svn}"
# ignore
these
folders (if the necessary grep flags are available)
EXC
_FOLDERS
=
"{.bzr,CVS,.git,.hg,.svn
,.idea
}"
if
grep-flag-available
--exclude-dir
=
.cvs
;
then
GREP_OPTIONS+
=
" --exclude-dir=
$
VCS
_FOLDERS
"
GREP_OPTIONS+
=
" --exclude-dir=
$
EXC
_FOLDERS
"
elif
grep-flag-available
--exclude
=
.cvs
;
then
GREP_OPTIONS+
=
" --exclude=
$
VCS
_FOLDERS
"
GREP_OPTIONS+
=
" --exclude=
$
EXC
_FOLDERS
"
fi
# export grep settings
...
...
@@ -24,5 +24,5 @@ alias grep="grep $GREP_OPTIONS"
# clean up
unset
GREP_OPTIONS
unset
VCS
_FOLDERS
unset
EXC
_FOLDERS
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