Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPINT doesn't work reliably
- X-seq: zsh-users 24305
- From: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: TRAPINT doesn't work reliably
- Date: Sat, 28 Sep 2019 18:58:59 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1569697147; bh=H/sFPHC8T1gelO/++IeUldYOn49UVpuKCvITyKzyjVw=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:Feedback-ID: From; b=ylF5WfDFF+7QdcoRQblg7bckGZKl/iCYWkcaavAthUtbjuy/EXoE/x4LGjA3mZXgs 6mOdhp/hKYWQBjCTWyy9qZuXNd4wH72tIfCXZnsxXsLdiyYt4Q/vv7UKDkEQRyggI9 Icn5dAg8y1L/TmwyoplxwXkXzHSRLZXL9kCMsjcA=
- Feedback-id: 9o-Cl1kmi7SjXhHVTYCKLMaOWEb5sehZHGWJCh5kD69wcWVVeOfY5BYq3wMUF0ymJu-oBC8u1h80JJ91GEz6Og==:Ext:ProtonMail
- In-reply-to: <XAHZ8eMcWhguYGHAhxgheYNjlPbvjQ3uF0BD81sHbencGnGpsemY3hgPVzZCSeGDGEutJZDp9Rvuk5B_9NczLQXl8YXsAyPuB6jisDzHS-0=@protonmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20190917164905epcas1p4ad458ffcd504501780d522880c81de3e@epcas1p4.samsung.com> <22AgAhXQWzavJGhNA8tFbGSMGk8z3KDGGa-pICX0lWszH622z2_nnc1acuvW3OcIbqAaXM_WAGJwmQU5Oph83DGbfQEplu1t3o7F5omeC4w=@protonmail.com> <1569434163.10786.26.camel@samsung.com> <EwtKvyologv1mcP4t0gYc4lnyj-ccruEDWJM6kEh3_-H1P6kvlnSEV_LunkUg4AxuDZkdVcoPHq2KnqTqQ4pOAzRd2bXfkj0tjAvgg2-cQQ=@protonmail.com> <1569511539.3770.6.camel@samsung.com> <7P_7qK1o03NLAWi2yO8YMPN4ErtxVF9fCDTtiPNjfRrzqKcmoysqAeR8nQ1B5DEY_uYE_Y6EBGsxysbflCAyLbm_h5qrobU4F0143UCxWW8=@protonmail.com> <debe7222-453c-4a33-a639-90dadc428503@www.fastmail.com> <ODmJIQmuJJcZdaTGdd_T4zXxU0G7RHNJl3pSGxRC3qTePtsFsXSosieytwRTp2x2GTxggH_l9ZGZQb19rELfq70ZCOU9Xtr0Ik4ks9SpbOQ=@protonmail.com> <20190928142957.ertue2us5ytn6ooo@tarpaulin.shahaf.local2> <XAHZ8eMcWhguYGHAhxgheYNjlPbvjQ3uF0BD81sHbencGnGpsemY3hgPVzZCSeGDGEutJZDp9Rvuk5B_9NczLQXl8YXsAyPuB6jisDzHS-0=@protonmail.com>
- Reply-to: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
On Saturday, September 28, 2019 6:21 PM, Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx> wrote:
> On Saturday, September 28, 2019 2:29 PM, Daniel Shahaf d.s@xxxxxxxxxxxxxxxxxx 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author