9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Michael Forney <mforney@mforney.org>
To: 9front@9front.org
Subject: [9front] [PATCH] g: fix duplicate files with directory argument
Date: Sat, 01 Jan 2022 22:51:39 +0000	[thread overview]
Message-ID: <CC0DBAAE95524C9116707E990F04A255@arrow> (raw)


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)

                 reply	other threads:[~2022-01-01 23:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CC0DBAAE95524C9116707E990F04A255@arrow \
    --to=mforney@mforney.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).