zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: unwanted error aborting continued command substitution
Date: Fri, 17 Apr 2015 17:31:43 +0100	[thread overview]
Message-ID: <20150417173143.1565d543@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <150417084645.ZM11686@torch.brasslantern.com>

On Fri, 17 Apr 2015 08:46:45 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> push-input uses send-break,
> and send-break is supposed to be a simulated interrupt for cases where
> the TTY intr character is not set.
> 
> So either send-break should actually set ERRFLAG_INT, or we need a third
> error flag for simulated interrupts.

Actually, it doesn't bother calling send-break, but I've found the point
where it doesn't.

Maybe the following is OK --- in fact, possibly we don't need the
ERRFLAG_ERROR bit set, but I don't think it's doing any harm.

One advantage of using a different bit would be we could abort back to
the top of ZLE rather than out of ZLE and back in again, which would
mean you finally had the ability to embed push-line in other widgets.
But that's for another day.

pws

diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 88623bb..cc66f99 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -854,7 +854,7 @@ pushlineoredit(char **args)
     }
     ret = pushline(args);
     if (!isfirstln) {
-	errflag |= ERRFLAG_ERROR;
+	errflag |= ERRFLAG_ERROR|ERRFLAG_INT;
 	done = 1;
     }
     clearlist = 1;
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 23286fc..4669ef2 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -1041,7 +1041,7 @@ copyprevshellword(UNUSED(char **args))
 int
 sendbreak(UNUSED(char **args))
 {
-    errflag |= ERRFLAG_ERROR;
+    errflag |= ERRFLAG_ERROR|ERRFLAG_INT;
     return 1;
 }
 


      reply	other threads:[~2015-04-17 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  4:39 broken parsing with $((`:`)) Mikael Magnusson
2015-04-17  9:16 ` PATCH: unwanted error aborting continued command substitution Peter Stephenson
2015-04-17 10:52   ` Mikael Magnusson
2015-04-17 11:02     ` Peter Stephenson
2015-04-17 15:46       ` Bart Schaefer
2015-04-17 16:31         ` Peter Stephenson [this message]

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=20150417173143.1565d543@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).