From 964773aa75f822fad97e62c70566dd64b2bcfdfc Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Mon, 25 Apr 2016 14:23:56 -0600 Subject: [PATCH] Use array indices for forward compatibility See issue #152 --- src/bind.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bind.zsh b/src/bind.zsh index 008848a..384ae08 100644 --- a/src/bind.zsh +++ b/src/bind.zsh @@ -27,7 +27,7 @@ _zsh_autosuggest_bind_widget() { # Completion widget completion:*) - eval "zle -C $prefix${(q)widget} ${${widgets[$widget]#*:}/:/ }" + eval "zle -C $prefix${(q)widget} ${${(s.:.)widgets[$widget]}[2,3]}" ;; esac diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 1e8004f..68438d4 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -138,7 +138,7 @@ _zsh_autosuggest_bind_widget() { # Completion widget completion:*) - eval "zle -C $prefix${(q)widget} ${${widgets[$widget]#*:}/:/ }" + eval "zle -C $prefix${(q)widget} ${${(s.:.)widgets[$widget]}[2,3]}" ;; esac