mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-22 00:21:27 +01:00
bad use of indices in _combination
This commit is contained in:
parent
386920afb5
commit
4d5d0327a1
1 changed files with 10 additions and 2 deletions
|
@ -72,13 +72,21 @@ pats=( "${(@)keys/*/*}" )
|
||||||
while [[ "$1" = *=* ]]; do
|
while [[ "$1" = *=* ]]; do
|
||||||
tmp="${1%%\=*}"
|
tmp="${1%%\=*}"
|
||||||
key="${tmp%:*}"
|
key="${tmp%:*}"
|
||||||
num="${${tmp##*:}:-1}"
|
if [[ $1 = *:* ]]; then
|
||||||
|
num=${tmp##*:}
|
||||||
|
else
|
||||||
|
num=1
|
||||||
|
fi
|
||||||
pats[$keys[(in:num:)$key]]="${1#*\=}"
|
pats[$keys[(in:num:)$key]]="${1#*\=}"
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
key="${1%:*}"
|
key="${1%:*}"
|
||||||
num="${${1##*:}:-1}"
|
if [[ $1 = *:* ]]; then
|
||||||
|
num=${1##*:}
|
||||||
|
else
|
||||||
|
num=1
|
||||||
|
fi
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if zstyle -a ":completion:${curcontext}:$tag" "$style" tmp; then
|
if zstyle -a ":completion:${curcontext}:$tag" "$style" tmp; then
|
||||||
|
|
Loading…
Reference in a new issue