From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 223 invoked by alias); 7 May 2012 09:08:30 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17057 Received: (qmail 18164 invoked from network); 7 May 2012 09:08:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=0W30kJqI2xh3qM2MiLqR5GYLh3NFrP5EuuNNeIj9u+g=; b=OLDUWJXoCZkW5uTotM7EMbd35q36LKAmGOEYVy/Sbi84a/qL32xSzZZHdFOBkmamSN HyLyy+qVO16qks4B1pZIWJbO4gb92u021YeFVBzq20XWOptaBz7x0BWOgfMt1omBlv4i 2MaM7uyT7uH0Powe/MZAXea3kMHqsq7ZhrOmZ6klGHNQLIPB35s7EYKYK/UC8luYs4kE VJEgHcuCVfZIIjPP9T6n8PyaFHokkhSQr+YumiJB5/vIUMivxuskS0TaC/vBlh32wmsm E2VsdIUqJF/KTR4g4VFgcwxtXKstNXZyb3qKAKLd7XwjJBiaZq9HXGmpIwtD2XXwZtEZ f5eg== Date: Mon, 7 May 2012 09:41:41 +0100 From: Stephen Blott To: zsh-users@zsh.org Subject: zargs: unexpected, non-xargs behaviour Message-ID: <20120507084141.GA8366@lohen.blott-online.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, Consider this script: # ---------------------------------------------------- autoload -U zargs data=(foo bar) echo $data | xargs -n 1 echo XX zargs -n 1 -- $data -- =echo XX # ---------------------------------------------------- I expected these to be equivalent, but here's the output: $ zsh < zargs_test.sh XX foo XX bar zargs: argument list too long zsh: exit 1 zsh < zargs_test.sh To get zargs to work as intended (separate calls to echo for each argument), I have use "-n 2". So, at least for this example, when the documentation says "This function works like GNU xargs, ...", that doesn't appear to be the case. Am I missing something? Steve