* Latest CVS: configure --pre=/to does not work
@ 1999-11-19 15:21 Andrej Borsenkow
0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 1999-11-19 15:21 UTC (permalink / raw)
To: ZSH workers mailing list
Just after CVS update about 15 min before ... (18:00 Moscow time - GMT+3)
Why every completion update breakes something ... :-)
bor@itsrm2:~/zsh%> zsh -f
itsrm2% autoload -U compinit; compinit -D
itsrm2% ./configure --pre=/to<TAB>
itsrm2% ./configure --pre=/toopt=''
<== Cursor here
/andrej
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Latest CVS: configure --pre=/to does not work
1999-11-22 9:34 Sven Wischnowsky
@ 1999-11-22 19:56 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-11-22 19:56 UTC (permalink / raw)
To: Sven Wischnowsky, zsh-workers
(Responding to 8716, which I pulled from my archive account as I mentioned.)
On Nov 22, 11:27am, Sven Wischnowsky wrote:
} Subject: Re: Latest CVS: configure --pre=/to does not work
}
} This patch also fixes this for me:
}
} Tanaka Akira wrote:
}
} > Z:akr@is27e1u11% Src/zsh -f
} > is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
} > is27e1u11% cvs <TAB>
} > CVS/ Src/ commit init rtag
} > Completion/ StartupFiles/ diff log status
} > Config/ Util/ edit login tag
} > Doc/ add editors logout unedit
} > Etc/ admin export rdiff update
} > Functions/ annotate history release watch
} > Misc/ checkout import remove watchers
} >
} > Wow. filenames shouldn't listed.
} >
} > And after second <TAB>:
} >
} > is27e1u11% cvs --allow-root=CVS/
} >
} > Of cause, the option `--allow-root' shouldn't completed.
}
} That was caused by the wrong test, too.
I now get the following equally strange behavior:
zagzig<3> cvs <TAB>
add commit export log release tag watchers
admin diff history login remove unedit
annotate edit import logout rtag update
checkout editors init rdiff status watch
zagzig<3> cvs -<TAB>
(FEEP)
zagzig<3> cvs - <TAB>
zagzig<3> cvs - --allow-root=
And --allow-root= is still the *only* option it will complete, even though
several others are passed to "_arguments -s" by _cvs.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Latest CVS: configure --pre=/to does not work
@ 1999-11-22 9:34 Sven Wischnowsky
1999-11-22 19:56 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-11-22 9:34 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> Just after CVS update about 15 min before ... (18:00 Moscow time - GMT+3)
>
> Why every completion update breakes something ... :-)
Because it *is* quite complicated, so much so that I can't tests
everything.
Sorry.
> bor@itsrm2:~/zsh%> zsh -f
> itsrm2% autoload -U compinit; compinit -D
> itsrm2% ./configure --pre=/to<TAB>
> itsrm2% ./configure --pre=/toopt=''
> <== Cursor here
The `opt=...' is the output of a `local' that got a parameter that ws
already made local by a previous `local'.
The missing completions were caused by a wrong test in `_arguments'
(and a missing `%%:*').
The patch also ensures that even if multiple calls to `comptry' add
the same tag, this tag will be used in only the first of theses
tags. For the functions we currently have, this is the right thing
(otherwise we might execute code more than once where the first
execution showed that it's useless to try this again). However, one
might argue that under certain circumstances it would be nice to allow
tags to be in more than one set (if tags were used slightly different
from the way they are used now). If we ever find a case where this is
useful, I'll add an option to either `_tags' or `comptry' to allow
that.
This patch also fixes this for me:
Tanaka Akira wrote:
> Z:akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% cvs <TAB>
> CVS/ Src/ commit init rtag
> Completion/ StartupFiles/ diff log status
> Config/ Util/ edit login tag
> Doc/ add editors logout unedit
> Etc/ admin export rdiff update
> Functions/ annotate history release watch
> Misc/ checkout import remove watchers
>
> Wow. filenames shouldn't listed.
>
> And after second <TAB>:
>
> is27e1u11% cvs --allow-root=CVS/
>
> Of cause, the option `--allow-root' shouldn't completed.
That was caused by the wrong test, too.
Bye
Sven
diff -u oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Fri Nov 19 09:55:53 1999
+++ Completion/Base/_arguments Mon Nov 22 10:16:47 1999
@@ -24,7 +24,7 @@
name="${name//[^a-zA-Z0-9_]/_}"
if (( ! ${(P)+name} )); then
- local iopts sopts pattern tmpo cur opt cache
+ local iopts sopts pattern tmpo cur cache
typeset -U lopts
cache=()
@@ -287,8 +287,7 @@
fi
fi
if [[ -n "$opts" && -z "$aret$matched" &&
- nm -ne compstate[nmatches] ]] &&
- _requested arguments; then
+ nm -eq compstate[nmatches] ]]; then
local prefix suffix
@@ -303,8 +302,10 @@
SUFFIX="$suffix"
IPREFIX="${IPREFIX}${equal[1]%%:*}="
matched=yes
- comparguments -L "$equal[1]" descr action subc
+
+ comparguments -L "${equal[1]%%:*}" descr action subc
curcontext="${oldcontext}:$subc"
+
continue
fi
fi
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Tue Nov 16 10:07:52 1999
+++ Src/Zle/computil.c Mon Nov 22 10:19:24 1999
@@ -2730,8 +2730,16 @@
args = arrdup(args);
for (p = q = args, all = comptags[lasttaglevel]->all; *p; p++)
- if (arrcontains(all, *p))
- *q++ = *p;
+ if (arrcontains(all, *p)) {
+ Ctset s;
+
+ for (s = comptags[lasttaglevel]->sets; s; s = s->next)
+ if (arrcontains(s->tags, *p))
+ break;
+
+ if (!s)
+ *q++ = *p;
+ }
*q = NULL;
if (*args) {
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-11-22 19:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-19 15:21 Latest CVS: configure --pre=/to does not work Andrej Borsenkow
1999-11-22 9:34 Sven Wischnowsky
1999-11-22 19:56 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).