Commit graph

17 commits

Author SHA1 Message Date
Ori Bernstein e60216c2b7 g: fix typo in last commit 2020-11-22 17:42:25 -08:00
Ori Bernstein 97008caa41 g: filter directory arguments
When searching directories recursively, it's still
desirable to filter the contents by the file pattern,
so that 'g foo /sys/src' doesn't end up searching for
foo within .$O files.

Files passed explicitly are still searched, so for the
old behavior, just use walk:

	g foo `{walk -f $dir}
2020-11-21 21:23:46 -08:00
Ori Bernstein 03499e53cc g: add '.hs' and 'mkfile' to the walk. (thanks joe9)
This expands the set of files that we grep through by default to
include mkfiles and haskell.
2020-07-14 20:46:00 -07:00
Ori Bernstein 0f9666ae16 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.
2020-02-26 21:45:00 -08:00
Ori Bernstein 341b64b5bd Remove trailing whitespace. 2019-06-04 22:47:07 -07:00
Ori Bernstein 41be41b493 Lost a trailing \n 2019-06-04 22:42:10 -07:00
Ori Bernstein 033c2812c2 Make 'g' grep recursively by default. 2019-06-04 22:36:32 -07:00
glenda 59b31cccdb g: revert accidental change, document missing file type 2018-02-27 10:08:23 -05:00
glenda 60befe7df1 games/mix: fix incorrect line numbers 2018-02-26 22:39:49 -05:00
cinap_lenrek 99e3bea407 g: dont pollute the environment (thanks BurnZeZ) 2016-03-13 22:34:08 +01:00
stanley lieber 9b63280ae8 g: search .awk and .rc files 2015-03-08 21:46:00 -04:00
ftrvxmtrx f815f7273a g: add *.cpp 2014-06-05 12:10:43 +02:00
cinap_lenrek 754bcbc480 g: chmod +x 2012-07-08 19:14:07 +02:00
cinap_lenrek f976fbe8c7 g: more extensions 2012-07-05 20:24:00 +02:00
stanley lieber b6993361e0 g: expand matched files list and add to grep(1) man page 2012-07-05 13:12:04 -05:00
cinap_lenrek ca58f1df17 merge 2011-11-24 00:04:36 +01:00
stanley lieber 67fe83b40f add rc scripts ", "" and g from rsc 2011-11-21 10:39:34 -06:00