Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update .scripts/spot

  • Loading branch information...
commit 80c082b56e71c7d6b67058dcec6e9e34e510c74e 1 parent 27ed331
@eriwen authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 .scripts/spot
View
8 .scripts/spot
@@ -38,7 +38,7 @@ EOF
}
# parse options
-while [[ "$1" =~ "-" ]]; do
+while [[ "$1" =~ ^- ]]; do
case $1 in
-s | --sensitive )
sensitive=1
@@ -99,17 +99,17 @@ fi
# run search
if [ $colors ]; then
- find $dir -type f ! -path '*/.git*' ! -path '*/.svn' -print0 \
+ find "$dir" -type f ! -path '*/.git*' ! -path '*/.svn' -print0 \
| GREP_COLOR="1;33;40" xargs -0 grep $grepopt "`echo $@`" \
| sed "s/^\([^:]*:\)\(.*\)/ \\
$cyan\1$reset \\
\2 /"
else
- find $dir -type f ! -path '*/.git*' ! -path '*/.svn' -print0 \
+ find "$dir" -type f ! -path '*/.git*' ! -path '*/.svn' -print0 \
| xargs -0 grep $grepopt "$@" \
| sed "s/^\([^:]*:\)\(.*\)/ \\
\1 \\
\2 /"
fi
-echo ""
+echo ""
Please sign in to comment.
Something went wrong with that request. Please try again.