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 --- Src/builtin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') 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