>From b2d0722f78ce1c8effd69119b989a9112cbf5d27 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 30 Oct 2012 00:02:45 -0700 Subject: [PATCH] -n option of zargs now works correctly Before this patch, the following wouls happen: dima@shorty:/tmp$ ls 1 2 3 dima@shorty:/tmp$ zargs -n1 -- * -- ls -l zargs: argument list too long --- Functions/Misc/zargs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Functions/Misc/zargs b/Functions/Misc/zargs index 71fd428..59b369e 100644 --- a/Functions/Misc/zargs +++ b/Functions/Misc/zargs @@ -212,20 +212,13 @@ then fi fi -n=${${n##-(n|-max-args(=|))}:-$[ARGC+c]} +n=${${n##-(n|-max-args(=|))}:-$[ARGC]} if (( n <= 0 )) then print -u2 'zargs: value for max-args must be >= 1' return 1 fi -if (( n > c )) -then (( n -= c )) -else - print -u2 zargs: argument list too long - return 1 -fi - s=${${s##-(s|-max-chars(=|))}:-20480} if (( s <= 0 )) then -- 1.7.10.4