about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-08-21 17:12:46 +0100
committerPeter Stephenson <pws@zsh.org>2015-08-21 17:12:46 +0100
commite5d5a76dce1cc488627c8623f0cd972c3d52644d (patch)
treeb08a2c65f8f3d03c80e4336a081b43124c08919c
parentf4c37a78b150005b59801b0a2fdbb36b50a293be (diff)
downloadzsh-e5d5a76dce1cc488627c8623f0cd972c3d52644d.tar.gz
zsh-e5d5a76dce1cc488627c8623f0cd972c3d52644d.tar.xz
zsh-e5d5a76dce1cc488627c8623f0cd972c3d52644d.zip
Test for 36265, no alias expansion after "function"
-rw-r--r--ChangeLog9
-rw-r--r--Test/C04funcdef.ztst13
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c2cdf8f5..4166fcbe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2015-08-21  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 36268: Test/C04funcdef.ztst: test for 36265.
+
+	* 36265 plus FAQ: fix alias expansion after "function"
+	Names after the first were treated as command words so had
+	non-global aliases expanded. Add an FAQ note that use of the
+	function keyword works around other alias problems.  Also
+	fixes problem that "function { ... }" didn't work with
+	IGNORE_BRACES set.
+
 	* 36264: Src/glob.c: pathbuf is apparently metafied; document
 	this and unmetafy for system calls.
 
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 74f881587..0951e2cde 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -295,6 +295,19 @@
 >}
 >This is the correct output.
 
+ unfunction command_not_found_handler # amusing but unhelpful
+ alias first='firstfn1 firstfn2' second='secondfn1 secondfn2'
+ function first second { print This is function $0; }
+ first
+ second
+ firstfn1
+ secondfn1
+127:No alias expansion after "function" keyword
+>This is function first
+>This is function second
+?(eval):6: command not found: firstfn1
+?(eval):7: command not found: secondfn1
+
 %clean
 
  rm -f file.in file.out