Permalink
Browse files

Merge branch 'master' of github.com:eriwen/dotfiles

  • Loading branch information...
2 parents d6afd8e + 80c082b commit e79154dacab689581414da2d1fe25ca97813b3e1 @eriwen committed Apr 24, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 .scripts/spot
View
@@ -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 ""

0 comments on commit e79154d

Please sign in to comment.