mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
The theme should manage the completion indicator.
This commit is contained in:
parent
f0499b76c3
commit
1fc1b459ee
3 changed files with 11 additions and 16 deletions
22
keyboard.zsh
22
keyboard.zsh
|
|
@ -9,7 +9,7 @@ fi
|
|||
zstyle ':omz:prompt' vicmd '<<<'
|
||||
|
||||
# Indicator to notify of generating completion.
|
||||
zstyle ':omz:completion:indicator' format "..."
|
||||
zstyle ':omz:completion' indicator '...'
|
||||
|
||||
# Beep on error in line editor.
|
||||
setopt BEEP
|
||||
|
|
@ -258,15 +258,13 @@ if zstyle -t ':omz:editor' dot-expansion; then
|
|||
fi
|
||||
|
||||
# Display an indicator when completing.
|
||||
if zstyle -t ':omz:completion:indicator' enable; then
|
||||
function expand-or-complete-prefix-with-indicator() {
|
||||
zstyle -s ':omz:completion:indicator' format indicator
|
||||
print -Pn "$indicator"
|
||||
unset indicator
|
||||
zle expand-or-complete-prefix
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-prefix-with-indicator
|
||||
bindkey "$keyinfo[Control]i" expand-or-complete-prefix-with-indicator
|
||||
fi
|
||||
function expand-or-complete-prefix-with-indicator() {
|
||||
local indicator
|
||||
zstyle -s ':omz:completion' indicator 'indicator'
|
||||
print -Pn "$indicator"
|
||||
zle expand-or-complete-prefix
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-prefix-with-indicator
|
||||
bindkey "$keyinfo[Control]i" expand-or-complete-prefix-with-indicator
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue