[120643] trunk/dports/lang/eero-devel

Eric Gallager egall at gwmail.gwu.edu
Sat Jun 7 09:15:50 PDT 2014


On 6/6/14, Brandon Allbery <allbery.b at gmail.com> wrote:
> 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.
>

Wasn't zsh actually already the default shell in OS X previously back
in the early days of OS X, before Apple switched to bash? Or am I
mis-remembering and getting it mixed up with tcsh?


More information about the macports-dev mailing list