9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] g: fix duplicate files with directory argument
@ 2022-01-01 22:51 Michael Forney
  0 siblings, 0 replies; only message in thread
From: Michael Forney @ 2022-01-01 22:51 UTC (permalink / raw)
  To: 9front


When we encounter a directory in the argument list, we don't want to
walk every argument, just that directory.
---
diff 795e0bb5dfa538feb42a62499121032e1cd6ac73 525c7bc4922fc86ba0bbe2281fbe92e697a4f6d8
--- a/rc/bin/g	Fri Feb 26 00:50:22 2021
+++ b/rc/bin/g	Sat Jan  1 14:51:39 2022
@@ -29,7 +29,7 @@
 	shift
 	for(f in $*){
 		if(test -d $f)
-			files=($files `$nl{walk -f $recurse -- $* \
+			files=($files `$nl{walk -f $recurse -- $f \
 				| grep -e $fullnames -e $suffixes >[2]/dev/null})
 		if not
 			files=($files $f)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-01 23:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-01 22:51 [9front] [PATCH] g: fix duplicate files with directory argument Michael Forney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).