From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: leading '=' in enviroment variable truncated
Date: Sun, 8 May 2016 20:12:17 +0100 [thread overview]
Message-ID: <20160508201217.5924511a@ntlworld.com> (raw)
In-Reply-To: <160508105949.ZM9904@torch.brasslantern.com>
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
next prev parent reply other threads:[~2016-05-08 19:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 16:21 Jacob Lowe
2016-05-07 16:43 ` Jacob Lowe
2016-05-08 17:59 ` Bart Schaefer
2016-05-08 19:12 ` Peter Stephenson [this message]
2016-05-08 20:24 ` Bart Schaefer
2016-05-08 20:28 ` Peter Stephenson
2016-05-08 21:58 ` Bart Schaefer
2016-05-08 22:16 ` Bart Schaefer
2016-05-09 9:11 ` Peter Stephenson
2016-05-09 14:52 ` Bart Schaefer
2016-05-09 2:14 ` Bart Schaefer
2016-05-09 2:19 ` Jacob Lowe
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=20160508201217.5924511a@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/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).