zsh-users
 help / color / mirror / code / Atom feed
From: Dennis Schwartz <dennis.schwartz@protonmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>,
	"zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: TRAPINT doesn't work reliably
Date: Sat, 28 Sep 2019 18:58:59 +0000	[thread overview]
Message-ID: <E5vfLU7GkUFccPbdRq2iuJLNtgDGz12uRGe5sVpCIc-QyUII8LEcB76jKouIMjEaeuLENey7wLQNulra1Z9ozFxeZ_CowjkyKqUSQlarIaI=@protonmail.com> (raw)
In-Reply-To: <XAHZ8eMcWhguYGHAhxgheYNjlPbvjQ3uF0BD81sHbencGnGpsemY3hgPVzZCSeGDGEutJZDp9Rvuk5B_9NczLQXl8YXsAyPuB6jisDzHS-0=@protonmail.com>

On Saturday, September 28, 2019 6:21 PM, Dennis Schwartz <dennis.schwartz@protonmail.com> wrote:

> On Saturday, September 28, 2019 2:29 PM, Daniel Shahaf d.s@daniel.shahaf.name wrote:
>
> > > > Does removing that assignment make a difference?
> > >
> > > No, the bug triggers for any TRAPINT function I've tried so far.
> >
> > Have you tried an empty function, «TRAPINT () {}»?
> > Is there any reason to also try a «trap ':' INT»?
>
> Both do nothing. It seems like TRAPINT needs to contain at least one
> command or a return statement.

Sorry, I only now realize that `trap ':' INT` actually overcomes the
problem.

I can now set

    trap 'VIMODE="$VIINS"; return 130' INT

and that actually doesn't trigger the bug. Neither does

    mytrap () {
        VIMODE="$VIINS"
        return 130
    }
    trap mytrap INT

but that doesn't change the VIMODE variable on my prompt nor
returns 130. (In both cases, $1 is always empty.)

Cheers,
Dennis

  reply	other threads:[~2019-09-28 18:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190917164905epcas1p4ad458ffcd504501780d522880c81de3e@epcas1p4.samsung.com>
2019-09-17 16:47 ` Dennis Schwartz
2019-09-24  8:44   ` Peter Stephenson
2019-09-25 13:02     ` Dennis Schwartz
2019-09-25 14:01       ` Peter Stephenson
2019-09-25 16:25         ` Dennis Schwartz
2019-09-25 17:04           ` Peter Stephenson
2019-09-25 18:46             ` Daniel Shahaf
2019-09-26 15:27               ` Peter Stephenson
2019-09-27 13:43                 ` Daniel Shahaf
2019-09-25 17:56           ` Peter Stephenson
2019-09-26 14:48             ` Dennis Schwartz
2019-09-26 15:25               ` Peter Stephenson
2019-09-26 17:10                 ` Dennis Schwartz
2019-09-27 13:46                   ` Daniel Shahaf
2019-09-28 11:16                     ` Dennis Schwartz
2019-09-28 14:29                       ` Daniel Shahaf
2019-09-28 18:21                         ` Dennis Schwartz
2019-09-28 18:58                           ` Dennis Schwartz [this message]
2019-09-28 16:00                       ` Bart Schaefer
2019-09-29 16:54                         ` Peter Stephenson
2019-09-27 19:05                   ` Peter Stephenson

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='E5vfLU7GkUFccPbdRq2iuJLNtgDGz12uRGe5sVpCIc-QyUII8LEcB76jKouIMjEaeuLENey7wLQNulra1Z9ozFxeZ_CowjkyKqUSQlarIaI=@protonmail.com' \
    --to=dennis.schwartz@protonmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@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).