From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3893 invoked from network); 18 Aug 2006 18:16:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Aug 2006 18:16:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 55022 invoked from network); 18 Aug 2006 18:15:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Aug 2006 18:15:56 -0000 Received: (qmail 15140 invoked by alias); 18 Aug 2006 18:15:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22624 Received: (qmail 15131 invoked from network); 18 Aug 2006 18:15:53 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Aug 2006 18:15:53 -0000 Received: (qmail 54709 invoked from network); 18 Aug 2006 18:15:53 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 18 Aug 2006 18:15:52 -0000 Received: from torch.brasslantern.com ([71.121.0.226]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J4700IMDHECB1Z0@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 18 Aug 2006 13:15:49 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k7IIFmpe024342 for ; Fri, 18 Aug 2006 11:15:48 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k7IIFlSm024341 for zsh-workers@sunsite.dk; Fri, 18 Aug 2006 11:15:47 -0700 Date: Fri, 18 Aug 2006 11:15:47 -0700 From: Bart Schaefer Subject: Re: zargs doesn't work reliably In-reply-to: <237967ef0608172016s4a47b309sd4a78f5889cfe2c7@mail.gmail.com> In-reply-to: <237967ef0608180612n3c57c588t6c75e7bf90c6eb5@mail.gmail.com> To: zsh-workers Message-id: <060818111547.ZM24340@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <237967ef0608171559k1bd8053bxf7a3d1cb53ef33e7@mail.gmail.com> <060817194225.ZM23196@torch.brasslantern.com> <237967ef0608172016s4a47b309sd4a78f5889cfe2c7@mail.gmail.com> <20060818112439.GC27421@ay.vinc17.org> <237967ef0608180612n3c57c588t6c75e7bf90c6eb5@mail.gmail.com> Comments: In reply to "Mikael Magnusson" "Re: zargs doesn't work reliably" (Aug 17, 8:17pm) Comments: In reply to "Mikael Magnusson" "Re: zargs doesn't work reliably" (Aug 18, 6:12am) On Aug 17, 8:17pm, Mikael Magnusson wrote: } } > There are approximately eleventeen zillion unix/linux commands that } > break given those file names, including rm, ls, and cp, so I'm not } > going to get particularly worked up about zargs behaving similarly. } } % ls -l -- * Yes, and you used an explicit "--" to tell ls that there might be "--" in its argument list; it would have failed if you did not. The same goes for "zargs -e". } Would this be possible? } zargs '[options]' 'command [initial-args]' [input-args] I'm not going to agree with you about any scheme that breaks congruence with the way xargs accepts its command and initial-args. The whole point of zargs is to mimic xargs as closely as possible. } Sorry, I should have looked in the manual. In my defense zargs --help } was so helpful that i didn't suspect it left anything useful out and i } did say i was tired :). Thanks for the pointers. Thanks for the compliment about the help. It does say fairly early: Options: --eof[=eof-str], -e[eof-str] Change the end-of-input-args string from "--" to eof-str. If given as --eof=, an empty argument is the end; as --eof or -e, with no (or an empty) eof-str, all arguments are input-args. On Aug 18, 6:12am, Mikael Magnusson wrote: } } > What if you need an initial-arg that contains a space? } } I don't quite understand the question... zargs '' 'touch file\ with\ } spaces' /tmp/* } or zargs '' 'touch "file with spaces"' /tmp/* What if you have one initial-arg with a space, one with a backslash, one with a single quote, and one with a double-quote? The input-args already come to you "quoted" via the globbing mechansim. It's much easier to pick something (including empty string, see the help snippet above) that won't appear in the input-args than it is to quote your way around oddities in the initial-args.