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

Re: Interrupting globs (Re: Something rotten in tar completion)

On Mon, Dec 8, 2014 at 2:03 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 8 Dec 2014 13:43:11 +0100
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> Test case for you guys:
>> % zsh -f
>> % precmd() echo yes
>> % sleep 2; echo no
>> ^C
>> yes
> I will assume it's uncontroversial that we do want the yes and not the
> no.  It looks reasonable.  (As an entirely separate matter, I wonder if
> precmd should have the error status available to it?)

Indeed, I update my prompt with the current directory in precmd, and
not doing that is quite confusing. (No opinion on this, but it seems
to right now?)

>> With :/'Ensure propagation' and :/'Put back' (eg, current tip of
>> interrupt_abort), I get neither printed.
>> So I guess some other place needs to clear interrupts as well, or the
>> "return to commandline" clear should be before precmd being called?
>> (If that's nonsense it's because I haven't looked at the code for that
>> at all).
> I think we should clear it before and after precmd to be safe.
> It's not really clear to me why this worked before; one of the various
> other errflag-clearings must have come in before we reached the
> top-level loop.  I'm not sure if that was intentional or accidental, but
> presumably somewhere high up in loop() with toplevel == 1 is right.  I
> can't work out if it should be even higher, before the history mechanism
> starts.

With this patch, everything seems to work as expected for me. (famous
last words)

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