[input] Use custom expand-or-complete in zsh < 5.3
as `expand-or-complete-with-redisplay` was added to fix an issue reported with zsh 5.2 when completing with <Tab><Tab><Ctrl-C>. See #85. Fixes #134. Closes #256
This commit is contained in:
parent
8655867ca2
commit
26dce76d28
|
@ -102,14 +102,16 @@ if [[ -n "${key_info[BackTab]}" ]]; then
|
||||||
bindkey "${key_info[BackTab]}" reverse-menu-complete
|
bindkey "${key_info[BackTab]}" reverse-menu-complete
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Redisplay after completing, and avoid blank prompt after <Tab><Tab><Ctrl-C>
|
autoload -Uz is-at-least && if ! is-at-least 5.3; then
|
||||||
expand-or-complete-with-redisplay() {
|
# Redisplay after completing, and avoid blank prompt after <Tab><Tab><Ctrl-C>
|
||||||
print -n '...'
|
expand-or-complete-with-redisplay() {
|
||||||
zle expand-or-complete
|
print -Pn '...'
|
||||||
zle redisplay
|
zle expand-or-complete
|
||||||
}
|
zle redisplay
|
||||||
zle -N expand-or-complete-with-redisplay
|
}
|
||||||
bindkey "${key_info[Control]}I" expand-or-complete-with-redisplay
|
zle -N expand-or-complete-with-redisplay
|
||||||
|
bindkey "${key_info[Control]}I" expand-or-complete-with-redisplay
|
||||||
|
fi
|
||||||
|
|
||||||
# Put into application mode and validate ${terminfo}
|
# Put into application mode and validate ${terminfo}
|
||||||
zle-line-init() {
|
zle-line-init() {
|
||||||
|
|
Loading…
Reference in a new issue