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

Re: When you know completion will be slow ...



On Thu, 06 Feb 2014 08:04:43 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Completion functions that are going to perform potentially slow operations
> (e.g., "git ls-files" is unpredictable on large repos, or the example from
> recently on zsh-users of "system_profiler -listDataTypes") could warn the
> user that there will be a delay.
> 
> The "zle -M" command works from inside a completion widget, and will erase
> the completion listing (which is then redrawn), so it could be used to
> display a message just before the long operation begins.

Do you know about the show-completer style?  It's not quite the same
thing but by the same token that means you get information even if you
don't know in advance completion's going to be slow.  I added this ages
ago and have been using it without any problem ever since (I don't even
notice the message unless somethings taking a long time and had to
confirm by trial that it was really appearing).

pws



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