From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17315 invoked by alias); 7 Feb 2014 16:15:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32362 Received: (qmail 14666 invoked from network); 7 Feb 2014 16:14:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140207081422.ZM28816@torch.brasslantern.com> Date: Fri, 07 Feb 2014 08:14:22 -0800 In-reply-to: <20140207122141.5052dd75@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: When you know completion will be slow ..." (Feb 7, 12:21pm) References: <140206080443.ZM27528@torch.brasslantern.com> <20140207122141.5052dd75@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: When you know completion will be slow ... MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 7, 12:21pm, Peter Stephenson wrote: } Subject: Re: When you know completion will be slow ... } } Bart Schaefer wrote: } > 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 had forgotten about it, having played with it for a while way back when you first added it and then left it alone. I just tried it again and I find the context it displays is not specific enough, but you're right that it does at least tell you that something is happening. However, using "zle -R" gives me bad behavior. Starting from Src/zsh -f: ------------ torch% autoload -U compinit; compinit -D torch% _deliberately_slow() { sleep 5; return 1; } torch% zstyle ':completion:*' completer _deliberately_slow _complete torch% zstyle ':completion:*' show-completer yes torch% ls Trying completion for :completion::deliberately-slow:: ------------ Becomes ------------ torch% ls Config/ config.modules.sh Makefile config.h config.status* Src/ config.log Doc/ stamp-h config.modules Etc/ Test/ config.modules.local foo/ ------------ and if I then press TAB again I get ------------ torch% ls Trying completion for :completion::deliberately-slow:: config.h config.status* Src/ config.log Doc/ stamp-h config.modules Etc/ Test/ config.modules.local foo/ ------------ which then becomes ------------ torch% ls Config/ config.h config.status* Src/ config.log Doc/ stamp-h config.modules Etc/ Test/ config.modules.local foo/ ------------ Oops, the first line of the completion listing is not redrawn. This does not happen with "zle -M".