From 0848acfb25b6601adcabc406089b6c7788df5749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Yhuel?= Date: Sat, 23 Jul 2011 23:34:02 +0200 Subject: [PATCH 1/2] Display red dots during completion process (disabled by default) --- lib/completion.zsh | 9 +++++++++ templates/zshrc.zsh-template | 3 +++ 2 files changed, 12 insertions(+) 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) From fc49b4a4ded376cd82b813dcb6d72fdc050b7bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Yhuel?= Date: Thu, 28 Jul 2011 19:52:35 +0200 Subject: [PATCH 2/2] Enable red dots during completion by default --- lib/completion.zsh | 2 +- templates/zshrc.zsh-template | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b3cc91822..2a457402a 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -59,7 +59,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \ # ... unless we really want to. zstyle '*' single-ignored show -if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then +if [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; then expand-or-complete-with-dots() { echo -n "\e[31m......\e[0m" zle expand-or-complete diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 1ab40aba6..4de1fa4e9 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -19,8 +19,8 @@ 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" +# 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)