* pws-19: completion problem
@ 1999-05-20 17:00 Andrej Borsenkow
0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1999-05-20 17:00 UTC (permalink / raw)
To: ZSH workers mailing list
bor@itsrm2:/tools/src/zsh-3.1.5-pws-19%> Src/zsh -f
itsrm2% cd Completion
itsrm2% fpath=($PWD/*)
itsrm2% source Core/compinit
itsrm2% cd ..
itsrm2% ./configure --pre=/to<TAB>
itsrm2% ./configure --pre=/tools/
No post-pws-19 patches
cheers
/andrej
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: pws-19: completion problem
@ 1999-05-21 7:14 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-05-21 7:14 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> bor@itsrm2:/tools/src/zsh-3.1.5-pws-19%> Src/zsh -f
> itsrm2% cd Completion
> itsrm2% fpath=($PWD/*)
> itsrm2% source Core/compinit
> itsrm2% cd ..
> itsrm2% ./configure --pre=/to<TAB>
> itsrm2% ./configure --pre=/tools/
Whoa. This happened because ${${a}[(I)foo]} didn't work (with `a'
being an array).
Since multsub() now correctly reports arrays, another bug showed
up. It went like this: multsub() found out the ${a} was an array and
set *isarr=1. This was copied into the value struct in
params.c:1073. Then getindex() was called, which called getarg() and
that looked at v->isarr in params.c:82[68]. And since a value of 1 is
the same as SCANPM_WANTVALS, it set *inv=0 which means that
index-reporting was switched off. Then it did the matching, stored
some number and later when the actual value was got, this resulted in
the matched *string* (and not the index) being expanded.
The patch below makes multsub() set isarr to SCANPM_MATCHMANY, which
is the value used for array-parameters. I can only hope that there are
no other places where this might cause problems.
Bye
Sven
--- os/subst.c Thu May 20 08:32:39 1999
+++ Src/subst.c Fri May 21 09:02:48 1999
@@ -279,7 +279,7 @@
*p = NULL;
if (a && mult_isarr) {
*a = r;
- *isarr = 1;
+ *isarr = SCANPM_MATCHMANY;
mult_isarr = omi;
return 0;
}
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-05-21 7:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-20 17:00 pws-19: completion problem Andrej Borsenkow
1999-05-21 7:14 Sven Wischnowsky
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).