Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: LINENO behaviour in sh mode



Op 20-03-17 om 03:57 schreef Martijn Dekker:
> Maybe 'emulate sh' should no longer turn off the EVAL_LINENO option.

Which turns out to be easy to accomplish.

Seems prudent to leave it turned off for ksh mode, as that emulates
ksh88 more than it does ksh93.

- M.

diff --git a/Src/options.c b/Src/options.c
index 2b5795b..5b068b3 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -131,7 +131,7 @@ static struct optname optns[] = {
 {{NULL, "exec",		      OPT_ALL},			 EXECOPT},
 {{NULL, "extendedglob",	      OPT_EMULATE},		 EXTENDEDGLOB},
 {{NULL, "extendedhistory",    OPT_CSH},			 EXTENDEDHISTORY},
-{{NULL, "evallineno",	      OPT_EMULATE|OPT_ZSH},	 EVALLINENO},
+{{NULL, "evallineno",	      OPT_EMULATE|OPT_SH|OPT_ZSH}, EVALLINENO},
 {{NULL, "flowcontrol",	      OPT_ALL},			 FLOWCONTROL},
 {{NULL, "forcefloat",         0},                        FORCEFLOAT},
 {{NULL, "functionargzero",    OPT_EMULATE|OPT_NONBOURNE},FUNCTIONARGZERO},


Messages sorted by: Reverse Date, Date, Thread, Author