From: Bart Schaefer <schaefer@brasslantern.com>
To: Alan Wagner-Krankel <awk@awkwork.com>
Cc: zsh-workers@zsh.org
Subject: Re: zargs error with some combinations of arguments
Date: Mon, 22 Aug 2022 14:31:57 -0700 [thread overview]
Message-ID: <CAH+w=7ZAMPN2sKbD1_Fg7eB0ZrqBHLYt3+8KrtFh8TEu24B=_w@mail.gmail.com> (raw)
In-Reply-To: <CAGZNKjKKfA3yS1HRBTgij1DtU0EB4OVx9GxsQq6i1=rnBUfUug@mail.gmail.com>
On Thu, Aug 18, 2022 at 7:12 PM Alan Wagner-Krankel <awk@awkwork.com> wrote:
>
> count:256 length:20479
> zargs: cannot fit single argument within size limit
>
> + (( a = s - ${#:-"$command "} ))
> + if (( a <= 0 ))
> + then
> + print -u2 'zargs: value for max-chars must be >= command length'
> + return 1
> + fi
Isn't that just trading one error message for a different one?
The below would seem to make more sense, is there something I missed?
diff --git a/Functions/Misc/zargs b/Functions/Misc/zargs
index 782d6811e..2f5447917 100644
--- a/Functions/Misc/zargs
+++ b/Functions/Misc/zargs
@@ -305,7 +305,7 @@ do
repeat $P
do
((ARGC)) || break
- for (( end=l; end && ${(c)#argv[1,end]} > s; end/=2 )) { }
+ for (( end=l; end && ${(c)#argv[1,end]} > s - $#command; end/=2 )) { }
(( end > n && ( end = n ) ))
args=( "${(@)argv[1,end]}" )
shift $((end > ARGC ? ARGC : end))
next prev parent reply other threads:[~2022-08-22 21:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 2:06 Alan Wagner-Krankel
2022-08-22 21:31 ` Bart Schaefer [this message]
2022-08-23 4:39 ` Alan Wagner-Krankel
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='CAH+w=7ZAMPN2sKbD1_Fg7eB0ZrqBHLYt3+8KrtFh8TEu24B=_w@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=awk@awkwork.com \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).