mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-06 09:01:13 +02:00
zsh-workers/8716
This commit is contained in:
parent
8c1b6f8064
commit
e7a0ef2db1
2 changed files with 15 additions and 6 deletions
|
@ -24,7 +24,7 @@ if (( long )); then
|
||||||
name="${name//[^a-zA-Z0-9_]/_}"
|
name="${name//[^a-zA-Z0-9_]/_}"
|
||||||
|
|
||||||
if (( ! ${(P)+name} )); then
|
if (( ! ${(P)+name} )); then
|
||||||
local iopts sopts pattern tmpo cur opt cache
|
local iopts sopts pattern tmpo cur cache
|
||||||
typeset -U lopts
|
typeset -U lopts
|
||||||
|
|
||||||
cache=()
|
cache=()
|
||||||
|
@ -287,8 +287,7 @@ if comparguments -i "$autod" "$@"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n "$opts" && -z "$aret$matched" &&
|
if [[ -n "$opts" && -z "$aret$matched" &&
|
||||||
nm -ne compstate[nmatches] ]] &&
|
nm -eq compstate[nmatches] ]]; then
|
||||||
_requested arguments; then
|
|
||||||
|
|
||||||
local prefix suffix
|
local prefix suffix
|
||||||
|
|
||||||
|
@ -303,8 +302,10 @@ if comparguments -i "$autod" "$@"; then
|
||||||
SUFFIX="$suffix"
|
SUFFIX="$suffix"
|
||||||
IPREFIX="${IPREFIX}${equal[1]%%:*}="
|
IPREFIX="${IPREFIX}${equal[1]%%:*}="
|
||||||
matched=yes
|
matched=yes
|
||||||
comparguments -L "$equal[1]" descr action subc
|
|
||||||
|
comparguments -L "${equal[1]%%:*}" descr action subc
|
||||||
curcontext="${oldcontext}:$subc"
|
curcontext="${oldcontext}:$subc"
|
||||||
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2730,8 +2730,16 @@ bin_comptry(char *nam, char **args, char *ops, int func)
|
||||||
args = arrdup(args);
|
args = arrdup(args);
|
||||||
|
|
||||||
for (p = q = args, all = comptags[lasttaglevel]->all; *p; p++)
|
for (p = q = args, all = comptags[lasttaglevel]->all; *p; p++)
|
||||||
if (arrcontains(all, *p))
|
if (arrcontains(all, *p)) {
|
||||||
*q++ = *p;
|
Ctset s;
|
||||||
|
|
||||||
|
for (s = comptags[lasttaglevel]->sets; s; s = s->next)
|
||||||
|
if (arrcontains(s->tags, *p))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!s)
|
||||||
|
*q++ = *p;
|
||||||
|
}
|
||||||
*q = NULL;
|
*q = NULL;
|
||||||
|
|
||||||
if (*args) {
|
if (*args) {
|
||||||
|
|
Loading…
Reference in a new issue