From 0f9666ae162f7c330850fa513e8ed3bd5fd995df Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Wed, 26 Feb 2020 21:45:00 -0800 Subject: [PATCH] walk arguments to g This allows us to 'g' the files within a directory, as in: g _MAX /sys/include/ape Before this change, we'd attempt to grep the directory structure, which is not ideal. After, we grep the files within the directory. --- rc/bin/g | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/bin/g b/rc/bin/g index 566ff5eb7..46b57dbeb 100755 --- a/rc/bin/g +++ b/rc/bin/g @@ -24,6 +24,6 @@ case 1 case * pattern=$1 shift - files=($*) + files=`$nl{walk -f $recurse -- $*} } grep -n $flags -- $pattern $files /dev/null