Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zargs: Argument list too long
- X-seq: zsh-workers 44097
- From: dana <dana@xxxxxxx>
- To: gi1242+zsh@xxxxxxxxx
- Subject: Re: zargs: Argument list too long
- Date: Fri, 1 Mar 2019 15:04:51 -0600
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=keuucS924rmQXpLS4UCv7Vz6a8cKrZShkHEfUU6YHYU=; b=X5TAP76laa2r8H4dA9JimLw2Ls1a7RJb6vm9JzshS2wgz5ufu80h0P9dnf1XvhEwBX LqS+6QN6IT/eVCpaWfsHlQJw4ASq8GbTi2OERe1ZC1iDweBpmr6Ye+oz9SooXHZE5lLI Ibqev8WzUuGBV3EzZQxfvFNsNznGDut0Ga4vhLpkwgbt5KhGl5rOHV/6YnlF8AtljeJG P2TGC482/49NYrv7+CgOgsu1Gy22qqHeCDZN3iY6d2zYwD9923aYiSpazfOFsEqxpEZd bx2i+wuShfmOzWOOBzz2602GBGaBSUvT4Zfb24ebgFdXnJF1FpS1ciwjTX6y6AYJlXM9 igNQ==
- In-reply-to: <20190301185616.ldsvccgtilfapyb2@andrew.cmu.edu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20190301185616.ldsvccgtilfapyb2@andrew.cmu.edu>
On 1 Mar 2019, at 12:56, gi1242+zsh@xxxxxxxxx wrote:
>But if I do
>
> zargs -n 1 -- arg1 arg2 arg3 -- echo Argument:
>
>I get an unfriendly error message
The comments at the top of the zargs function source explain this and some
other useful things. On recent versions of zsh you can read it with:
autoload +X zargs; cat $functions_source[zargs]
It has this to say about -n:
>POSIX -L and -n are mutually exclusive and effectively synonymous;
>zargs accepts both and considers -n to be a limit on the total number
>of arguments per command line, that is, including the initial-args.
>Thus the following fails with "argument list too long":
> zargs -n 3 -- echo Here are four words
>The smallest limit implied by the combination of -L and -n is used.
So... just use -L (or -l) instead of -n
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author