summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2011-08-11 05:51:03 -0700
committerRobby Russell <robby@planetargon.com>2011-08-11 05:51:03 -0700
commitbe2ab226949831f502a05adfb513691693e03702 (patch)
treed21ed17622b99f34aae41b225cb11508c090c443
parent098e515eff139a016deb4a16e6bbafd5fadbe017 (diff)
parentfc49b4a4ded376cd82b813dcb6d72fdc050b7bed (diff)
downloadzsh-be2ab226949831f502a05adfb513691693e03702.tar.gz
zsh-be2ab226949831f502a05adfb513691693e03702.tar.bz2
zsh-be2ab226949831f502a05adfb513691693e03702.zip
Merge pull request #492 from hwti/red-dots-completion
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..2a457402a 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 [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; 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..4de1fa4e9 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 disable red dots displayed while waiting for completion
+# DISABLE_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)