* [bug] problem with env vars that zsh sets itself
@ 2016-09-30 8:55 ` Stephane Chazelas
2016-09-30 10:09 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Chazelas @ 2016-09-30 8:55 UTC (permalink / raw)
To: Zsh hackers list
zsh's "export" command doesn't list the environment variables
that zsh sets itself.
$ env -i zsh -xc 'export;env'
+zsh:1> export
+zsh:1> env
HOME=/home/stephane
LOGNAME=stephane
SHLVL=0
PWD=/home/stephane
OLDPWD=/home/stephane
_=/usr/bin/env
Actually, it's as if they were not given the "export" flag even
though they are passed to the environment of executed commands:
$ env -i zsh -c 'typeset -p HOME SHLVL'
typeset HOME=/home/stephane
typeset -i10 SHLVL=1
$ zsh --version
zsh 5.2 (x86_64-debian-linux-gnu)
Seems to be a regression. It used to work OK in 4.1.1
--
Stephane
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug] problem with env vars that zsh sets itself
2016-09-30 8:55 ` [bug] problem with env vars that zsh sets itself Stephane Chazelas
@ 2016-09-30 10:09 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2016-09-30 10:09 UTC (permalink / raw)
To: Zsh hackers list
On Fri, 30 Sep 2016 09:55:38 +0100
Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> zsh's "export" command doesn't list the environment variables
> that zsh sets itself.
diff --git a/Src/params.c b/Src/params.c
index 8271a8b..e115102 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -4727,6 +4727,7 @@ addenv(Param pm, char *value)
if (pm->env)
zsfree(pm->env);
pm->env = newenv;
+ pm->node.flags |= PM_EXPORTED;
#else
/*
* Under Cygwin we must use putenv() to maintain consistency.
pws
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-30 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20160930095458eucas1p29d154e52d3afbbd3d4dd5c6185593af6@eucas1p2.samsung.com>
2016-09-30 8:55 ` [bug] problem with env vars that zsh sets itself Stephane Chazelas
2016-09-30 10:09 ` Peter Stephenson
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).