* How to display "waiting to complete" dots
@ 2007-06-13 20:53 Ian Langworth
2007-06-14 9:33 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Ian Langworth @ 2007-06-13 20:53 UTC (permalink / raw)
To: zsh-users
I've found that completion on NFS can take a while. Vim has this neat
feature that shows dots while it's waiting to complete a filename, so
I spent some time to figure out how to make that happen with Zsh.
With the following snippet, when you hit Tab, you'll see dots for a
split-second before the completion finishes:
-------------------------------------------------------------
expand-or-complete-with-dots() {
echo -n "..."
zle expand-or-complete
zle redisplay
}
zle -N expand-or-complete-with-dots
bindkey "^I" expand-or-complete-with-dots
-------------------------------------------------------------
I haven't tested this fully, but I love it already.
Extra: If you want your dots to be fire-truck red, instead do echo -n
"\e[31m...\e[0m"
--
Ian Langworth
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to display "waiting to complete" dots
2007-06-13 20:53 How to display "waiting to complete" dots Ian Langworth
@ 2007-06-14 9:33 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2007-06-14 9:33 UTC (permalink / raw)
To: zsh-users
"Ian Langworth" wrote:
> With the following snippet, when you hit Tab, you'll see dots for a
> split-second before the completion finishes:
If you have some fairly recent version of the shell, also try
zstyle ":completion:*" show-completer true
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-14 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-13 20:53 How to display "waiting to complete" dots Ian Langworth
2007-06-14 9:33 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).