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:
parent
386920afb5
commit
4d5d0327a1
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue