zsh-workers
 help / color / mirror / code / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: LINENO behaviour in sh mode
Date: Mon, 20 Mar 2017 04:41:08 +0100	[thread overview]
Message-ID: <8f746628-b793-bf12-ba26-415bcd51ae0d@inlv.org> (raw)
In-Reply-To: <f3458567-3d11-eada-ea2a-6f88f9b64a9b@inlv.org>

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

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.


[-- Attachment #2: evallineno-sh.patch --]
[-- Type: text/x-patch, Size: 678 bytes --]

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},

  reply	other threads:[~2017-03-23  0:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20  2:57 Martijn Dekker
2017-03-20  3:41 ` Martijn Dekker [this message]
2017-03-23  2:45 ` Bart Schaefer
2017-03-23  3:09   ` Martijn Dekker
2017-03-23 16:11     ` Bart Schaefer
2017-03-23 16:23       ` Duplicate messages (was Re: LINENO behaviour in sh mode) Aaron Schrab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f746628-b793-bf12-ba26-415bcd51ae0d@inlv.org \
    --to=martijn@inlv.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).