aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-03-25 15:30:51 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-03-25 15:30:51 +1300
commit2cbd0834c2787a7bb32673c5ade30ebddf3bcce8 (patch)
tree98a419013116e9859fbd7ae0ef2380c03aac2b5a
parentWho knows, could be useful for somebody else (diff)
downloadmgrep-2cbd0834c2787a7bb32673c5ade30ebddf3bcce8.tar.gz
mgrep-2cbd0834c2787a7bb32673c5ade30ebddf3bcce8.zip
Always show full path in output
-rwxr-xr-xmgrep6
1 files changed, 1 insertions, 5 deletions
diff --git a/mgrep b/mgrep
index 13275b3..8469408 100755
--- a/mgrep
+++ b/mgrep
@@ -94,13 +94,9 @@ if [[ -e $exclude ]] ; then
done < "$exclude"
fi
-# Try to change into the path for find(1). This is just to prevent long
-# prefixes in the output of `grep -h`.
-cd -- "$path" || exit
-
# Run the find(1) command with its determined arguments, with an -exec option
# calling grep(1) with its determined arguments.
-find ./* \
+find "$path" \
-type f \
"${find_args[@]}" \
-exec \