shithub: riscv

Download patch

ref: 0f9666ae162f7c330850fa513e8ed3bd5fd995df
parent: 1ccd0cd04d75840861e26f6c5f6ac73396d43d8a
author: Ori Bernstein <[email protected]>
date: Wed Feb 26 16:45:00 EST 2020

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.

--- a/rc/bin/g
+++ b/rc/bin/g
@@ -24,6 +24,6 @@
 case *
 	pattern=$1
 	shift
-	files=($*)
+	files=`$nl{walk -f $recurse -- $*}
 }
 grep -n $flags -- $pattern $files /dev/null