From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: pws-19: completion problem
Date: Fri, 21 May 1999 09:14:22 +0200 (MET DST) [thread overview]
Message-ID: <199905210714.JAA01215@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Thu, 20 May 1999 21:00:28 +0400
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
next reply other threads:[~1999-05-21 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-21 7:14 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-05-20 17:00 Andrej Borsenkow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199905210714.JAA01215@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).