summaryrefslogtreecommitdiff
path: root/rc/bin/g
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-02-26 21:45:00 -0800
committerOri Bernstein <ori@eigenstate.org>2020-02-26 21:45:00 -0800
commit0f9666ae162f7c330850fa513e8ed3bd5fd995df (patch)
treec9c52d8e2ae1e707dcf3e673c6b2ae79363dfdea /rc/bin/g
parent1ccd0cd04d75840861e26f6c5f6ac73396d43d8a (diff)
downloadplan9front-0f9666ae162f7c330850fa513e8ed3bd5fd995df.tar.xz
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.
Diffstat (limited to 'rc/bin/g')
-rwxr-xr-xrc/bin/g2
1 files changed, 1 insertions, 1 deletions
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