Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Interrupting globs (Re: Something rotten in tar completion)
On Sun, Dec 7, 2014 at 6:59 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Or we could do this, which stops the matcher-list and completer loops
> (and any tag loops or the like that are also in play) and then does
> the rest of _main_complete as usual:
>
> diff --git a/Completion/Base/Core/_main_complete
> b/Completion/Base/Core/_main_complete
> index 91b68fe..5c4e368 100644
> --- a/Completion/Base/Core/_main_complete
> +++ b/Completion/Base/Core/_main_complete
> @@ -126,13 +126,14 @@ fi
>
> _completer_num=1
>
> -# We assume localtraps to be in effect here ...
> -integer SECONDS=0
> -TRAPINT TRAPQUIT() {
> +# We assume localtraps and no_localloops to be in effect here ...
> +float SECONDS=0
> +trap '
> zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
> zle -R
> + repeat 1 break 10000 # break out of any reasonable number of loops
> return 130
> -}
> +' INT QUIT
>
> # Call the pre-functions.
shortloops is not in _comp_options, so this needs to be repeat 1; do
break 10000; done, if you go with this one.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author