Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-Originating-IP: [86.21.161.213]
X-Spam: 0
X-Authority: v=2.1 cv=J5VXl1TS c=1 sm=1 tr=0 a=oo3MgO7t/4XyXFuSzI3dDQ==:117
 a=oo3MgO7t/4XyXFuSzI3dDQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10
 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NEAV23lmAAAA:8
 a=t-IPkPogAAAA:8 a=Mob1a5e7QqKLPTnbkCAA:9 a=CjuIK1q_8ugA:10 a=8cc4vwO5-n0A:10
 a=z9dJwno5l634igLiVhy-:22 a=Bn2pgwyD2vrAyMmN8A2t:22 a=TwOW_m0CY6OjrxjWeTv9:22
Date: Sun, 8 May 2016 20:12:17 +0100
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: leading '=' in enviroment variable truncated
Message-ID: <20160508201217.5924511a@ntlworld.com>
In-Reply-To: <160508105949.ZM9904@torch.brasslantern.com>
References: <CAEyFG7ZkxS9iuVtEoJT2aa_ErBm=Nm6JqkpSgt=-=3P-nuZBtg@mail.gmail.com>
	<160508105949.ZM9904@torch.brasslantern.com>
X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Seq: zsh-workers 38430

On Sun, 8 May 2016 10:59:49 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On May 7,  4:21pm, Jacob Lowe wrote:
> }
> } https://github.com/motdotla/dotenv/issues/140
> } 
> } TEST='=FOO' node -e 'console.log(process.env.TEST)'
> } 
> } This spits out "FOO" with no leading "=".
> 
> As mentioned in the dotenv issue, this happens only on OSX.  I've just
> confirmed that it's a problem either with the library implementations
> of setenv() / unsetenv(), or with zsh's use of them.  If I comment out
> HAVE_SETENV / HAVE_UNSETENV from config.h and rebuild zsh, I am no
> longer able to reproduce the problem.

This appears to be a feature.

https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/setenv.3.html

  These functions set, unset and fetch environment variables from the host
  environment list.  For compatibility with differing environment
  conven-tions, conventions, the given arguments name and value may be
  appended and prepended, respectively, with an equal sign ``=''.

Very useful, if I may say so.

pws

