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

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



On Sat, 06 Dec 2014 21:59:11 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> No, I'd forgotten the exact circumstances.  However, as I mentioned in
> another part of the thread, there's something I missed as well, which
> is that if you ^C all the way out of _main_complete, some interesting
> (if not always important) bits of state don't get restored.
> 
> If we stick with the TRAPINT(), then we need this ...
> 
> diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
> index 91b68fe..bc63e83 100644
> --- a/Completion/Base/Core/_main_complete
> +++ b/Completion/Base/Core/_main_complete
> @@ -129,7 +129,7 @@ _completer_num=1
>  # We assume localtraps to be in effect here ...
>  integer SECONDS=0
>  TRAPINT TRAPQUIT() {
> -  zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
> +  zle -M "Killed by signal in ${funcstack[2]} after ${SECONDS}s";
>    zle -R
>    return 130
>  }

That's probably the way to go --- my gut feel is the behaviour of the
other form of trap is too far from what we need to make it a good
starting point.

I'll get onto the discussion about internal changes separately.  Rather
than replying to everything separately, I might try to summarise what I
think we've learnt so far and you can tell me what's missing...

pws



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