From 0d8a58095196ece20dadd4894c4ddf8ddf440cdf Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 29 Jan 2010 21:44:54 +0000 Subject: users/14752: add #! line to zed allow script run with -i to exit on return --- ChangeLog | 5 ++++- Functions/Misc/zed | 2 +- Src/builtin.c | 3 ++- 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 + * 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; -- cgit 1.4.1