Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "VAR=foo export VAR" no longer works in zsh emulation
On Tue, 24 Jan 2017 13:50:37 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> VAR=foo export VAR
>
> used to work in zsh the same way as in other Bourne-like shells.
> That syntax the Bourne equivalent of Korn's:
>
> export VAR=foo
>
> (without the ambiguity of whether VAR=foo should be treated as
> an assignment or a command argument).
Do you have POSIX_BUILTINS set? It's needed to get the special
behaviour of not restoring the environment. I don't think that
behaviour changed recently, though.
% zsh -f
% setopt posixbuiltins
% FOO=bar export FOO
% printenv FOO
bar
%
and
% ARGV0=sh zsh -f
$ FOO=bar export FOO
$ printenv FOO
bar
$
I can believe there could be other weird interactions around, however.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author