mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-03 08:11:03 +02:00
zsh-workers/7736
This commit is contained in:
parent
047267bdf3
commit
b6dd9af942
2 changed files with 20 additions and 6 deletions
|
@ -39,7 +39,7 @@ if (( $#_arr )); then
|
||||||
# descriptions.
|
# descriptions.
|
||||||
|
|
||||||
_simple=()
|
_simple=()
|
||||||
_len=1
|
_len=-1
|
||||||
for _i in "$_arr[@]"; do
|
for _i in "$_arr[@]"; do
|
||||||
_tmp="${#_i%%:*}"
|
_tmp="${#_i%%:*}"
|
||||||
if [[ "$_i" = *:?* ]]; then
|
if [[ "$_i" = *:?* ]]; then
|
||||||
|
@ -49,6 +49,11 @@ if (( $#_arr )); then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ _len -lt 0 ]]; then
|
||||||
|
eval "${_param}=''"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Now we build the list in `_tmp', adding one line per string.
|
# Now we build the list in `_tmp', adding one line per string.
|
||||||
|
|
||||||
_tmp=''
|
_tmp=''
|
||||||
|
|
|
@ -3951,16 +3951,21 @@ addmatches(Cadata dat, char **argv)
|
||||||
} else
|
} else
|
||||||
dat->prpre = dupstring(dat->prpre);
|
dat->prpre = dupstring(dat->prpre);
|
||||||
/* Select the group in which to store the matches. */
|
/* Select the group in which to store the matches. */
|
||||||
if (dat->group || dat->ylist) {
|
if (dat->group) {
|
||||||
endcmgroup(NULL);
|
endcmgroup(NULL);
|
||||||
begcmgroup((dat->ylist ? NULL : dat->group),
|
begcmgroup(dat->group, (dat->aflags & CAF_NOSORT));
|
||||||
(dat->aflags & CAF_NOSORT));
|
|
||||||
if (dat->aflags & CAF_NOSORT)
|
if (dat->aflags & CAF_NOSORT)
|
||||||
mgroup->flags |= CGF_NOSORT;
|
mgroup->flags |= CGF_NOSORT;
|
||||||
} else {
|
} else {
|
||||||
endcmgroup(NULL);
|
endcmgroup(NULL);
|
||||||
begcmgroup("default", 0);
|
begcmgroup("default", 0);
|
||||||
}
|
}
|
||||||
|
if (dat->ylist) {
|
||||||
|
endcmgroup(NULL);
|
||||||
|
begcmgroup(NULL, (dat->aflags & CAF_NOSORT));
|
||||||
|
if (dat->aflags & CAF_NOSORT)
|
||||||
|
mgroup->flags |= CGF_NOSORT;
|
||||||
|
}
|
||||||
/* Select the set of matches. */
|
/* Select the set of matches. */
|
||||||
oisalt = (dat->aflags & CAF_ALT);
|
oisalt = (dat->aflags & CAF_ALT);
|
||||||
|
|
||||||
|
@ -5944,9 +5949,13 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
|
||||||
curcc = cc;
|
curcc = cc;
|
||||||
|
|
||||||
mflags = 0;
|
mflags = 0;
|
||||||
if (cc->ylist || cc->gname) {
|
if (cc->gname) {
|
||||||
endcmgroup(NULL);
|
endcmgroup(NULL);
|
||||||
begcmgroup((cc->ylist ? NULL : cc->gname), cc->mask2 & CC_NOSORT);
|
begcmgroup(cc->gname, cc->mask2 & CC_NOSORT);
|
||||||
|
}
|
||||||
|
if (cc->ylist) {
|
||||||
|
endcmgroup(NULL);
|
||||||
|
begcmgroup(NULL, cc->mask2 & CC_NOSORT);
|
||||||
}
|
}
|
||||||
if (cc->mask & CC_REMOVE)
|
if (cc->mask & CC_REMOVE)
|
||||||
mflags |= CMF_REMOVE;
|
mflags |= CMF_REMOVE;
|
||||||
|
|
Loading…
Reference in a new issue