The theme should manage the completion indicator.

This commit is contained in:
Sorin Ionescu 2011-12-26 13:37:54 -05:00
parent f0499b76c3
commit 1fc1b459ee
3 changed files with 11 additions and 16 deletions

View file

@ -9,7 +9,7 @@ fi
zstyle ':omz:prompt' vicmd '<<<' zstyle ':omz:prompt' vicmd '<<<'
# Indicator to notify of generating completion. # Indicator to notify of generating completion.
zstyle ':omz:completion:indicator' format "..." zstyle ':omz:completion' indicator '...'
# Beep on error in line editor. # Beep on error in line editor.
setopt BEEP setopt BEEP
@ -258,15 +258,13 @@ if zstyle -t ':omz:editor' dot-expansion; then
fi fi
# Display an indicator when completing. # Display an indicator when completing.
if zstyle -t ':omz:completion:indicator' enable; then
function expand-or-complete-prefix-with-indicator() { function expand-or-complete-prefix-with-indicator() {
zstyle -s ':omz:completion:indicator' format indicator local indicator
zstyle -s ':omz:completion' indicator 'indicator'
print -Pn "$indicator" print -Pn "$indicator"
unset indicator
zle expand-or-complete-prefix zle expand-or-complete-prefix
zle redisplay zle redisplay
} }
zle -N expand-or-complete-prefix-with-indicator zle -N expand-or-complete-prefix-with-indicator
bindkey "$keyinfo[Control]i" expand-or-complete-prefix-with-indicator bindkey "$keyinfo[Control]i" expand-or-complete-prefix-with-indicator
fi

View file

@ -13,9 +13,6 @@ zstyle ':omz:*:*' color 'yes'
# Auto set the tab and window titles. # Auto set the tab and window titles.
zstyle ':omz:terminal' auto-title 'yes' zstyle ':omz:terminal' auto-title 'yes'
# Indicate that completions are being generated.
zstyle ':omz:completion:indicator' enable 'no'
# Set the plugins to load (see $OMZ/plugins/). # Set the plugins to load (see $OMZ/plugins/).
zstyle ':omz:load' plugin 'archive' 'git' zstyle ':omz:load' plugin 'archive' 'git'

View file

@ -22,7 +22,7 @@ function prompt_sorin_setup() {
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook
add-zsh-hook precmd prompt_sorin_precmd add-zsh-hook precmd prompt_sorin_precmd
zstyle ':omz:completion:indicator' format '%B%F{red}...%f%b' zstyle ':omz:completion' indicator '%B%F{red}...%f%b'
zstyle ':omz:prompt' vicmd '%F{yellow}%f%B%F{red}%f%b%F{red}%f' zstyle ':omz:prompt' vicmd '%F{yellow}%f%B%F{red}%f%b%F{red}%f'
zstyle ':omz:plugin:git:prompt' action ':%%B%F{yellow}%s%f%%b' zstyle ':omz:plugin:git:prompt' action ':%%B%F{yellow}%s%f%%b'
zstyle ':omz:plugin:git:prompt' added ' %%B%F{green}✚%f%%b' zstyle ':omz:plugin:git:prompt' added ' %%B%F{green}✚%f%%b'