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

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



2014-12-05 9:20 GMT+01:00 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
> On Dec 4,  5:12pm, Peter Stephenson wrote:
> }
> } It's always in _files or _path_files --- kind of where you'd expect from
> } the code you quoted.  I guess it's the glob that's not very
> } interruptible.
>
> This seems to help:
>
> diff --git a/Src/glob.c b/Src/glob.c
> index ca7bc44..b3903f2 100644
> --- a/Src/glob.c
> +++ b/Src/glob.c
> @@ -463,7 +463,7 @@ scanner(Complist q, int shortcircuit)
>      int errssofar = errsfound;
>      struct dirsav ds;
>
> -    if (!q)
> +    if (!q || errflag)
>         return;
>      init_dirsav(&ds);

I've no Idea if the expansion of something like “ls /a/b/c<tab>” to
“ls /aaaaa/bbbbbb/cccccc/” is related to this code, but it seems to
have zero impact there: I'm still unable to interrupt the horribly
slow expansion using ctrl+c.

Before (zsh from a few weeks ago):
Killed by signal in  after 5s

After (zsh of right now + the above suggested modification):
Killed by signal in _path_files after 5s

…but I don't get my prompt back.

Best regards,

-- 
Jérémie



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