[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
|
||||
fi
|
||||
|
||||
# Redisplay after completing, and avoid blank prompt after <Tab><Tab><Ctrl-C>
|
||||
expand-or-complete-with-redisplay() {
|
||||
print -n '...'
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.3; then
|
||||
# Redisplay after completing, and avoid blank prompt after <Tab><Tab><Ctrl-C>
|
||||
expand-or-complete-with-redisplay() {
|
||||
print -Pn '...'
|
||||
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}
|
||||
zle-line-init() {
|
||||
|
|
Loading…
Reference in a new issue