1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-21 12:11:26 +01:00

bad use of indices in _combination

This commit is contained in:
Peter Stephenson 2007-07-05 18:23:13 +00:00
parent 386920afb5
commit 4d5d0327a1

View file

@ -72,13 +72,21 @@ pats=( "${(@)keys/*/*}" )
while [[ "$1" = *=* ]]; do
tmp="${1%%\=*}"
key="${tmp%:*}"
num="${${tmp##*:}:-1}"
if [[ $1 = *:* ]]; then
num=${tmp##*:}
else
num=1
fi
pats[$keys[(in:num:)$key]]="${1#*\=}"
shift
done
key="${1%:*}"
num="${${1##*:}:-1}"
if [[ $1 = *:* ]]; then
num=${1##*:}
else
num=1
fi
shift
if zstyle -a ":completion:${curcontext}:$tag" "$style" tmp; then