Skip to content

Commit

Permalink
Try $key_info if $key is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Jun 20, 2021
1 parent 154d4e7 commit f43530d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/.autocomplete.key
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ builtin autoload -Uz add-zle-hook-widget
if [[ ${(t)key} != association ]]; then
unset key
typeset -gA key=()
[[ ${(t)key_info} == association ]] &&
key=( "${(@kv)key_info}" )
fi

: ${key[Control-Space]:=$'\0'}
Expand All @@ -25,6 +27,6 @@ fi
: ${key[Left]:=$'\e[D'}
: ${key[End]:=$'\e[F'}
: ${key[Home]:=$'\e[H'}
: ${key[Shift-Tab]:=$'\e[Z'}
: ${key[Shift-Tab]:=${(v)key[(I)(#i)Backtab]:-$'\e[Z'}}
: ${key[PageUp]:=$'\e[5~'}
: ${key[PageDown]:=$'\e[6~'}

0 comments on commit f43530d

Please sign in to comment.