summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-07-14 20:46:00 -0700
committerOri Bernstein <ori@eigenstate.org>2020-07-14 20:46:00 -0700
commit03499e53ccf8391c5b5d4b9eca096abe5e9312c3 (patch)
tree1ad150a33dbed0ccffefbda97bda14fe297a85b9 /rc
parent0366f11300521165ff22423514a5d829a1f34912 (diff)
downloadplan9front-03499e53ccf8391c5b5d4b9eca096abe5e9312c3.tar.xz
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.
Diffstat (limited to 'rc')
-rwxr-xr-xrc/bin/g4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc/bin/g b/rc/bin/g
index 46b57dbeb..d400b1c93 100755
--- a/rc/bin/g
+++ b/rc/bin/g
@@ -20,7 +20,9 @@ case 0
exit usage
case 1
pattern=$1
- files=`$nl{walk -f $recurse | grep '\.([bcChlmsy]|asm|awk|cc|cgi|cpp|cs|go|goc|java|lx|ms|pl|py|rc|tex|xy)$' >[2]/dev/null}
+ fullnames='mkfile$'
+ suffixes='\.([bcChlmsy]|asm|awk|cc|cgi|cpp|cs|go|goc|hs|java|lx|ms|pl|py|rc|tex|xy)$'
+ files=`$nl{walk -f $recurse | grep -e $fullnames -e $suffixes >[2]/dev/null}
case *
pattern=$1
shift