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,FREEMAIL_FROM,
	HTML_MESSAGE,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:from:date:message-id:subject:to;
        bh=G0nlRIGOEKXs+OBoZVYm5VFA1UwqQ8UTU+Pcj0Wiv1A=;
        b=RvW05sY7B4YveFaN7R10VT/BzQw9qwVFaM7/fnxWIYSuvrkIzv8UuV20MuRmAGzxd4
         KPC1lyRn0uNA62icE4VFa+bbVG2VdC1xUOQLsgjd8LbLNNlQKTRETKKdrWZbIemCquNZ
         aHn5/PcvWpTe16gx8nKSWl9yH7N+pX0VklyhHrv5xQh0GBiRF4jD/jTumNOOoVBKM1H0
         orZfwZ9f/4IRc0H9bew5sEcEMoez6VscYQbibsBYzCGsxnZ+FWFCDsVxJmxrMeUH8L4u
         h2VRni8KzzoqUNWLMgCnisuUNTyj7GM/Sjkk5LoW3KK4fReS7WauJInjcynD0kkpbkgN
         vrIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
        bh=G0nlRIGOEKXs+OBoZVYm5VFA1UwqQ8UTU+Pcj0Wiv1A=;
        b=BE+B1rp3fRrQI/3eqfw6vqH1Jh55ybSBBymhzCkYLT9uACGSVN/KgmS+lCVdlKuOtp
         9yMn2rx1fX4ofyoMySFfKrCDiCSEZq7wPo46BhjUQlgmGMByv3rWf14iMH1qYa02Ac6L
         FuM74TRKm+SKIsqBFxFySSjVJ0rL+OnzwsPRz+dHOkATJSJhDoQ9e7CxqLzhB1C63GJT
         ZBaD7kwkeCey05s197TrTaFa4dNutyX4uCb3J/ThP4pOGpeb4VUXVgjsiACX0wCR11xS
         qY/JBZIL0j4TvcKZ4gMIHlRHCAVv41RmxrxFh3JE5NPeNTEKoUffzxzgKqFC3DYv5xAV
         R5KQ==
X-Gm-Message-State: AOPr4FVT7WtRdOwmA6y1Y6J8ooQPMnCrpG8cDU6HYpJJ0XchDCssONgb1skyQrPP8Xe/j2v/BfkdwFG/NgtxkA==
X-Received: by 10.31.169.202 with SMTP id s193mr1728809vke.114.1462638092650;
 Sat, 07 May 2016 09:21:32 -0700 (PDT)
MIME-Version: 1.0
From: Jacob Lowe <jacoblowe2.0@gmail.com>
Date: Sat, 07 May 2016 16:21:22 +0000
Message-ID: <CAEyFG7ZkxS9iuVtEoJT2aa_ErBm=Nm6JqkpSgt=-=3P-nuZBtg@mail.gmail.com>
Subject: leading '=' in enviroment variable truncated
To: zsh-workers@zsh.org
Content-Type: multipart/alternative; boundary=001a11415ca0f291d3053242f7b8
X-Seq: zsh-workers 38417

--001a11415ca0f291d3053242f7b8
Content-Type: text/plain; charset=UTF-8

Hey all,

First off thanks for making/maintaining ZSH. Its a awesome project, and has
been my default shell for 3 plus years.

I recently ran into a unique thing that ZSH does that cause a bug that was
filed on a project I help maintain.

https://github.com/motdotla/dotenv/issues/140

It is a javascript module that loads environment variables into the process
for the node program to use. I noticed the module was parsing the the env
ok and the bug only occurred while preloading the script. I tried to load
in the env via the command line straight into the node program as well.

TEST='=FOO' node -e 'console.log(process.env.TEST)'


This spits out "FOO" with no leading "=".

So I filed and issue on nodejs repo thinking this had to do with the way it
was handling the environment variables.

https://github.com/nodejs/node/issues/6627

>From the feedback in the ticket, it seems this is happening in ZSH only and
when logging into bash the command works as expected. I also tried
something very similar in ruby and got the same result.

TEST='=test' ruby -e 'puts ENV["TEST"]'


This also spits out "FOO" with no leading "=".

Is this intended behavior? and thanks again.

--001a11415ca0f291d3053242f7b8--

