Use expand-or-complete for shell expansion

Fix current word completion as described in:
http://www.zsh.org/mla/users/2003/msg00610.html.
main
Adrià Casajús 13 years ago committed by Sorin Ionescu
parent 5edd663510
commit 9b9a4aa9b3

@ -174,7 +174,7 @@ function expand-or-complete-with-indicator {
local indicator local indicator
zstyle -s ':omz:module:editor' completing 'indicator' zstyle -s ':omz:module:editor' completing 'indicator'
print -Pn "$indicator" print -Pn "$indicator"
zle expand-or-complete-prefix zle expand-or-complete
zle redisplay zle redisplay
} }
zle -N expand-or-complete-with-indicator zle -N expand-or-complete-with-indicator
@ -275,7 +275,7 @@ for keymap in 'emacs' 'viins'; do
bindkey -M "$keymap" "$key_info[BackTab]" reverse-menu-complete bindkey -M "$keymap" "$key_info[BackTab]" reverse-menu-complete
# Complete in the middle of word. # Complete in the middle of word.
bindkey -M "$keymap" "$key_info[Control]I" expand-or-complete-prefix bindkey -M "$keymap" "$key_info[Control]I" expand-or-complete
# Expand .... to ../.. # Expand .... to ../..
if zstyle -t ':omz:module:editor' dot-expansion; then if zstyle -t ':omz:module:editor' dot-expansion; then

Loading…
Cancel
Save