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

Re: Trial patch for showing completion in progress



On Thu, 9 Sep 2004, Peter Stephenson wrote:

> Is there a better place for this?  On the whole I think this point is OK.

How about this?

    zstyle () {
        [[ $3 = matcher-list ]] && {
            zle -R "Trying completion for $2"
            sleep 1
        }
        builtin zstyle "$@"
    }

> Is there a way of doing this only if completion takes a certain time?

I don't think there's a sifficiently low-level loop that's common to all
completions.  You could try hooking into _wanted or _tags, I suppose.

> Is there a way of removing the zle -M output if the completion produced
> no output?

Using zle -R instead of -M takes care of that.  Is there some other bad
side-effect of -R?



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