From 2cbd0834c2787a7bb32673c5ade30ebddf3bcce8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Mar 2015 15:30:51 +1300 Subject: Always show full path in output --- mgrep | 6 +----- 1 file changed, 1 insertion(+), 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 \ -- cgit v1.2.3