summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--Config/version.mk4
-rw-r--r--Etc/FAQ.yo2
-rw-r--r--README13
-rw-r--r--Src/parse.c6
-rw-r--r--Test/D03procsubst.ztst19
6 files changed, 45 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 78be78583..9bdfa81bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-12-21 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * unposted: README, Config/version.mk, Etc/FAQ.yo: release
+ 5.0.2.
+
+2012-12-21 Peter Stephenson <pws@csr.com>
+
+ * 30930: Src/parse.c, Test/D03procsubst.ztst: anonymous
+ functions shouldn't be marked as simple; this prevented process
+ based features from working in their arguments.
+
2012-12-20 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Config/version.mk: zsh 5.0.1.
@@ -401,5 +412,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5776 $
+* $Revision: 1.5778 $
*****************************************************
diff --git a/Config/version.mk b/Config/version.mk
index 6c064f86e..eca41f444 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
# This must also serve as a shell script, so do not add spaces around the
# `=' signs.
-VERSION=5.0.1
-VERSION_DATE='December 20, 2012'
+VERSION=5.0.2
+VERSION_DATE='December 21, 2012'
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index 7c41ff53e..ed46571d0 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -301,7 +301,7 @@ sect(On what machines will it run?)
sect(What's the latest version?)
- Zsh 5.0.1 is the latest production version. For details of all the
+ Zsh 5.0.2 is the latest production version. For details of all the
changes, see the NEWS file in the source distribution.
A beta of the next version is sometimes available. Development of zsh is
diff --git a/README b/README
index 4c127f26a..b0ce8fa9f 100644
--- a/README
+++ b/README
@@ -5,8 +5,9 @@ THE Z SHELL (ZSH)
Version
-------
-This is version 5.0.1 of the shell. This is a stable release.
-There are minor new features as well as bug fixes since 5.0.0.
+This is version 5.0.2 of the shell. This is a stable release.
+There are minor new features as well as bug fixes since 5.0.0 and
+one bug fix since the short-lived 5.0.1.
Installing Zsh
--------------
@@ -27,20 +28,20 @@ Zsh is a shell with lots of features. For a list of some of these, see the
file FEATURES, and for the latest changes see NEWS. For more
details, see the documentation.
-Incompatibilities between 5.0.0 and 5.0.1
+Incompatibilities between 5.0.0 and 5.0.2
-----------------------------------------
In 5.0.0, the new "sticky" emulation feature was applied to functions
explicitly declared within an expression following `emulate ... -c', but
did not apply to functions marked for autoload in that expression. This
was not documented and experience suggests it was inconvenient, so in
-5.0.1 autoloads also have the sticky property.
+5.0.2 autoloads also have the sticky property.
In other words,
emulate zsh -c 'func() { ... }'
-behaves the same way in 5.0.0 and 5.0.1, with the function func always being
+behaves the same way in 5.0.0 and 5.0.2, with the function func always being
run in native zsh emulation regardless of the current option settings.
However,
@@ -48,7 +49,7 @@ However,
behaves differently: in 5.0.0, func was loaded with the options in
effect at the point where it was first run, and subsequently run with
-whatever options were in effect at that point; in 5.0.1, func is loaded
+whatever options were in effect at that point; in 5.0.2, func is loaded
with native zsh emulation options and run with those same options. This
is now the recommended way of ensuring a function is loaded and run with
a consistent set of options.
diff --git a/Src/parse.c b/Src/parse.c
index 0f5d99cef..753080d70 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -846,7 +846,7 @@ par_cmd(int *complex)
break;
case FUNC:
cmdpush(CS_FUNCDEF);
- par_funcdef();
+ par_funcdef(complex);
cmdpop();
break;
case DINBRACK:
@@ -1420,7 +1420,7 @@ par_subsh(int *complex)
/**/
static void
-par_funcdef(void)
+par_funcdef(int *complex)
{
int oecused = ecused, num = 0, onp, p, c = 0;
int so, oecssub = ecssub;
@@ -1471,6 +1471,7 @@ par_funcdef(void)
if (num == 0) {
/* Anonymous function, possibly with arguments */
incmdpos = 0;
+ *complex = 1;
}
zshlex();
} else if (unset(SHORTLOOPS)) {
@@ -1735,6 +1736,7 @@ par_simple(int *complex, int nr)
if (argc == 0) {
/* Anonymous function, possibly with arguments */
incmdpos = 0;
+ *complex = 1;
}
zshlex();
} else {
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 602b1da15..88fa902bb 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -88,3 +88,22 @@
print something=${:-=(echo 'C,D),(F,G)'}
1: Graceful handling of bad substitution in enclosed context
?(eval):1: unterminated `=(...)'
+
+ () {
+ print -n "first: "
+ cat $1
+ print -n "second: "
+ cat $2
+ } =(echo This becomes argument one) =(echo and this argument two)
+ function {
+ print -n "third: "
+ cat $1
+ print -n "fourth: "
+ cat $2
+ } =(echo This becomes argument three) =(echo and this argument four)
+0:Process environment of anonymous functions
+>first: This becomes argument one
+>second: and this argument two
+>third: This becomes argument three
+>fourth: and this argument four
+