Browse code

Display red dots during completion process (disabled by default)

Loïc Yhuel authored on 23/07/2011 at 21:34:02
Showing 2 changed files
... ...
@@ -59,3 +59,12 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
59 59
 # ... unless we really want to.
60 60
 zstyle '*' single-ignored show
61 61
 
62
+if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then
63
+  expand-or-complete-with-dots() {
64
+    echo -n "\e[31m......\e[0m"
65
+    zle expand-or-complete
66
+    zle redisplay
67
+  }
68
+  zle -N expand-or-complete-with-dots
69
+  bindkey "^I" expand-or-complete-with-dots
70
+fi
... ...
@@ -19,6 +19,9 @@ ZSH_THEME="robbyrussell"
19 19
 # Uncomment following line if you want to disable autosetting terminal title.
20 20
 # DISABLE_AUTO_TITLE="true"
21 21
 
22
+# Uncomment following line if you want red dots to be displayed while waiting for completion
23
+# COMPLETION_WAITING_DOTS="true"
24
+
22 25
 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
23 26
 # Example format: plugins=(rails git textmate ruby lighthouse)
24 27
 plugins=(git)