about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-01-29 21:44:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-01-29 21:44:54 +0000
commit0d8a58095196ece20dadd4894c4ddf8ddf440cdf (patch)
tree694d08e761b3a07f393eb9852ec28f2894841b3d
parent1d31834223066694e2859f8ff8c84e22ae613810 (diff)
downloadzsh-0d8a58095196ece20dadd4894c4ddf8ddf440cdf.tar.gz
zsh-0d8a58095196ece20dadd4894c4ddf8ddf440cdf.tar.xz
zsh-0d8a58095196ece20dadd4894c4ddf8ddf440cdf.zip
users/14752: add #! line to zed
allow script run with -i to exit on return
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Misc/zed2
-rw-r--r--Src/builtin.c3
3 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 54a151349..eb2cdfc89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-01-29  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* users/14752: Functions/Misc/zed, Src/builtin.c: add #!
+	line to zed; allow script run with -i to exit on "return".
+
 	* Julien Jehannet: users/14751: Functions/Misc/zed: variable
 	incorrect when autoloading function.
 
@@ -12644,5 +12647,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4874 $
+* $Revision: 1.4875 $
 *****************************************************
diff --git a/Functions/Misc/zed b/Functions/Misc/zed
index 2a3d2313e..c2caaf3f5 100644
--- a/Functions/Misc/zed
+++ b/Functions/Misc/zed
@@ -1,4 +1,4 @@
-#
+#!/bin/zsh
 # zed
 #
 # No other shell could do this.
diff --git a/Src/builtin.c b/Src/builtin.c
index 47b201264..0ce3aef56 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4577,7 +4577,8 @@ bin_break(char *name, char **argv, UNUSED(Options ops), int func)
 	breaks = nump ? minimum(num,loops) : 1;
 	break;
     case BIN_RETURN:
-	if (isset(INTERACTIVE) || locallevel || sourcelevel) {
+	if ((isset(INTERACTIVE) && isset(SHINSTDIN))
+	    || locallevel || sourcelevel) {
 	    retflag = 1;
 	    breaks = loops;
 	    lastval = num;