be2ab226949831f502a05adfb513691693e03702

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #492 from hwti/red-dots-completion

Display red dots during completion process (disabled by default)

Diff

 1diff --git a/lib/completion.zsh b/lib/completion.zsh
 2index fdd0a8536cd4825235d0f4fddd217f0f398ea86b..2a457402a90d3198fb6233c1ea50d4c862b6b1c9 100644
 3--- a/lib/completion.zsh
 4+++ b/lib/completion.zsh
 5@@ -59,3 +59,12 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
 6 # ... unless we really want to.
 7 zstyle '*' single-ignored show
 8 
 9+if [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; then
10+  expand-or-complete-with-dots() {
11+    echo -n "\e[31m......\e[0m"
12+    zle expand-or-complete
13+    zle redisplay
14+  }
15+  zle -N expand-or-complete-with-dots
16+  bindkey "^I" expand-or-complete-with-dots
17+fi
18diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
19index 77f866d52c532ae5d217aa1c88e8f46d07a30c77..4de1fa4e93eef740d94c3b31b2f87d0cec4648da 100644
20--- a/templates/zshrc.zsh-template
21+++ b/templates/zshrc.zsh-template
22@@ -19,6 +19,9 @@ ZSH_THEME="robbyrussell"
23 # Uncomment following line if you want to disable autosetting terminal title.
24 # DISABLE_AUTO_TITLE="true"
25 
26+# Uncomment following line if you want disable red dots displayed while waiting for completion
27+# DISABLE_COMPLETION_WAITING_DOTS="true"
28+
29 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
30 # Example format: plugins=(rails git textmate ruby lighthouse)
31 plugins=(git)