Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Environment variables with nonstandard names are silently dropped on macOS
- X-seq: zsh-workers 41424
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Environment variables with nonstandard names are silently dropped on macOS
- Date: Thu, 13 Jul 2017 16:13:30 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=5BN1XNt/iv2b5zk493/tbVgRph5ANkPD7gHxMAfGDXM=; b=oaS4QHazsCrKzrfzvv8qFiDqbLUbAW5F/qXjGQFJvOIPrejhjZmuaLd+nDwT+WK8jE OdUvMMuM9NOB6/M0q5Pv5Sm48zucjqj7IrGXZKrquQSvY4qMtL7Hr2done1F9z0WEsRb r74UfKL9RwWyg8LxHvTkylLAVn9lk/66o3KDmL2Uk9pvQ5tAnjb9YdLFDbRt8FIp7GWw 3Et9ZGN75i5rOj0WLdM+QE/9Pf57uCujmBymXBwn4NM7XfSfyGaRlLnbA/wducqmxJ19 Evr7NrEKpyDEUZtEM/tkb5edOioIG+WQNMkJRkMkSCTAFT3HgR6mNjrdDTbScL5D0AsW iZPA==
- In-reply-to: <CADB4rJGm=juEDoaNXouUJYnNNsh2ctM2sxa5sMaCfpdem0epfw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CADB4rJGm=juEDoaNXouUJYnNNsh2ctM2sxa5sMaCfpdem0epfw@mail.gmail.com>
On Thu, Jul 13, 2017 at 2:07 PM, Radon Rosborough <radon.neon@xxxxxxxxx> wrote:
>
> env FOO.BAR=QUUX zsh -c 'printenv FOO.BAR'
>
> In Zsh 5.2 on all operating systems, this prints QUUX. In Zsh 5.3.1 on
> macOS (but not elsewhere), it prints nothing and returns nonzero.
>
> The bug was introduced in commit 9dffe404a464289aedade8762795ee4d1bbb1d3f,
> which adds a special case for macOS pertaining to environment variable
> handling.
This patch merely changes one #define from config.h, to cause putenv()
to be used in place of setenv() -- there is no other code change.
Unfortunately discarding putenv() as well does not have any effect on
this, because "FOO.BAR" is not a valid identifier in zsh --- you can't
write ${FOO.BAR} without getting "zsh:1: bad substitution" -- and in
fact I don't see how it ever worked with setenv() either, because the
loop that imports the environment skips anything that doesn't match
zsh's definition of an identifier.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author