summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;