From: Bart Schaefer <schaefer@brasslantern.com>
To: Motoi Washida <a66@h8.dion.ne.jp>
Cc: zsh-workers@sunsite.dk
Subject: Re: number of arguments zargs use
Date: Sat, 30 Oct 2004 22:30:58 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0410302124550.21138@toltec.zanshin.com> (raw)
In-Reply-To: <DE201C1C-2A7B-11D9-A1A8-000D93502E64@h8.dion.ne.jp>
On Sat, 30 Oct 2004, Motoi Washida wrote:
> This tries to get size of arguments allowed. I don't know this is
> portable enough, but it seems to work for me.
This set me off wandering down the road to Obfuscatory ...
s=${${s##-(s|-max-chars(=|))}:-$(((s=$({command getconf ARG_MAX ||
command sysctl -n kern.argmax || echo 0} 2>/dev/null))?
(s-=${#$(builtin typeset +x)}+2048):20480))}
That would be equivalent to, though significantly less readable than,
your patch, except that there is a bug in your patch:
> + else
> + s=-20480
> + fi
That should be "s=20480", not -20480. You'd never want a negative number
of characters.
next prev parent reply other threads:[~2004-10-31 5:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-30 13:59 Motoi Washida
2004-10-31 5:30 ` Bart Schaefer [this message]
2004-10-31 7:34 ` Motoi Washida
2004-11-04 1:32 ` Bart Schaefer
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=Pine.LNX.4.61.0410302124550.21138@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=a66@h8.dion.ne.jp \
--cc=zsh-workers@sunsite.dk \
/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).