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

Re: SIGINT/TRAPINT Behaves Differently in 4.3.11



If this can help, I observed a change in the way TRAPINT behaves since
4.3.11 too. I have the following snippet in my .zshrc, which forces saving
cancelled commands to history (from some thread in zsh-users):

    TRAPINT () {
  zle && print -s -- $BUFFER
  return $1
}

Since 4.3.11, the following sequence gets the shell stuck with a "TRAPINT:1:
command not found: -s" error message:
 - Type something
 - Call _complete_help
 - <Ctrl><C>

I don't know whether this is related with sorin's one, but it used to work
fine before.

 -- Julien

2011/10/1 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>

> On Sun, 25 Sep 2011 15:31:56 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > On Sep 16, 10:17am, Bart Schaefer wrote:
> > } Subject: Re: SIGINT/TRAPINT Behaves Differently in 4.3.11
> > }
> > } On Thu, Sep 15, 2011 at 7:35 PM,  <sorin.ionescu@xxxxxxxxx> wrote:
> > } >
> > } > I have the following call tree: function prompt_theme_precmd() ->
> function git-info() -> SUBSHELL -> function git() -> hub -> Git.
> > } >
> > } > On ZSH 4.3.10, pressing CTRL + C while the above is executing calls
> > } > the shell's TRAPINT function, which is the expected behaviour, but
> > } > since 4.3.11, SIGINT is sent only to the executing process (Git), and
> > } > the shell's TRAPINT function is no longer called.
> >
> > I've been doing some experiments to try to reproduce this, but I can't
> > make it happen.  I always get the TRAPINT called when I interrupt a job
> > started from precmd.
>
> This is as far as I got, too, but my attempts have not been remotely
> exhaustive.
>
> --
> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
> Web page now at http://homepage.ntlworld.com/p.w.stephenson/
>


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