[120643] trunk/dports/lang/eero-devel
Brandon Allbery
allbery.b at gmail.com
Fri Jun 6 11:39:37 PDT 2014
On Fri, Jun 6, 2014 at 1:58 PM, Vincent <vince at macports.org> wrote:
> > With the quotes. Pedantically ${1+"$@"} is most correct, but (a) I
> suspect the case that protects against would fail anyway, and (b) on OS X
> /bin/sh is bash which handles "$@" as if it were ${1+"$@"}. (I do wonder
> how long before Apple abandons bash though....)
>
> I must admit I fail to see what ${1+“$@”} exactly refers to…
>
In classic Bourne shell, "$@" produces a single empty quoted string if
there are no shell parameters. ${1+"$@"} means "expand "$@" if and only if
$1 is set, even if it is set to an empty string". The Korn shell
(specifically ksh93, IIRC) introduced the interpretation of "$@" that bash
uses.
As the Korn shell is open source now, it would not surprise me if that
replaced bash at some point, should Apple decide it needs a newer shell
than a GPL2-ed bash. zsh also has a permissive license (although some
contributed scripts are GPL; I haven't checked the version) and might also
be an alternative.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140606/1fd55a65/attachment.html>
More information about the macports-dev
mailing list