summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Yhuel <loic.yhuel@gmail.com>2011-07-23 23:34:02 +0200
committerLoïc Yhuel <loic.yhuel@gmail.com>2011-07-24 21:48:21 +0200
commit0848acfb25b6601adcabc406089b6c7788df5749 (patch)
treec686306f3ca224da32566055b77558a48ab5f60d
parent3350c2298f6e0b629c8efe9821262a093f975fd3 (diff)
downloadzsh-0848acfb25b6601adcabc406089b6c7788df5749.tar.gz
zsh-0848acfb25b6601adcabc406089b6c7788df5749.tar.bz2
zsh-0848acfb25b6601adcabc406089b6c7788df5749.zip
Display red dots during completion process (disabled by default)
-rw-r--r--lib/completion.zsh9
-rw-r--r--templates/zshrc.zsh-template3
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh
index fdd0a8536..b3cc91822 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -59,3 +59,12 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
# ... unless we really want to.
zstyle '*' single-ignored show
+if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then
+ expand-or-complete-with-dots() {
+ echo -n "\e[31m......\e[0m"
+ zle expand-or-complete
+ zle redisplay
+ }
+ zle -N expand-or-complete-with-dots
+ bindkey "^I" expand-or-complete-with-dots
+fi
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 77f866d52..1ab40aba6 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -19,6 +19,9 @@ ZSH_THEME="robbyrussell"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
+# Uncomment following line if you want red dots to be displayed while waiting for completion
+# COMPLETION_WAITING_DOTS="true"
+
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)