Browse Source

Check for empty values in $key_info properly

master
Sorin Ionescu 12 years ago
parent
commit
b1b5af23b6
  1. 5
      modules/editor/init.zsh

5
modules/editor/init.zsh

@ -95,9 +95,10 @@ key_info=( @@ -95,9 +95,10 @@ key_info=(
)
# Do not bind any keys if there are empty values in $key_info.
for key in "$key_info[@]"; do
if [[ -z "$key" ]]; then
for key in "${(k)key_info[@]}"; do
if [[ -z "$key_info[$key]" ]]; then
print "prezto: one or more keys are non-bindable" >&2
unset key{,_info}
return 1
fi
done

Loading…
Cancel
Save