* Empty array and parameter expansion
@ 1998-06-10 13:26 Vincent Lefevre
[not found] ` <980610102651.ZM12101@candle.brasslantern.com>
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 1998-06-10 13:26 UTC (permalink / raw)
To: zsh-users
I don't understand the following behavior (with zsh 3.0.5):
% i=test
% a=()
% a=($a $i)
% echo $a
$i
I would have thought that "test" would be printed.
Is it a bug or a strange feature?
--
Vincent Lefevre <Vincent.Lefevre@ens-lyon.fr> - PhD stud. in Computer Science
Web: http://www.ens-lyon.fr/~vlefevre/ - 100% validated HTML - Acorn Risc PC,
Yellow Pig 17, Championnat International des Jeux Mathematiques et Logiques,
TETRHEX, Faits divers insolites, etc...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Empty array and parameter expansion
[not found] ` <980610102651.ZM12101@candle.brasslantern.com>
@ 1998-06-10 21:36 ` Vincent Lefevre
1998-06-11 2:30 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 1998-06-10 21:36 UTC (permalink / raw)
To: zsh-users
On Wed, Jun 10, 1998 at 10:26:51 -0700, Bart Schaefer wrote:
> } % i=test
> } % a=()
> } % a=($a $i)
> } % echo $a
> } $i
>
> I don't understand it either, as it doesn't happen to me.
After some tests... it happens only when RC_EXPAND_PARAM is set.
But is it normal?
--
Vincent Lefevre <Vincent.Lefevre@ens-lyon.fr> - PhD stud. in Computer Science
Web: http://www.ens-lyon.fr/~vlefevre/ - 100% validated HTML - Acorn Risc PC,
Yellow Pig 17, Championnat International des Jeux Mathematiques et Logiques,
TETRHEX, Faits divers insolites, etc...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Empty array and parameter expansion
1998-06-10 21:36 ` Vincent Lefevre
@ 1998-06-11 2:30 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1998-06-11 2:30 UTC (permalink / raw)
To: Vincent Lefevre; +Cc: zsh-users
On Jun 10, 11:36pm, Vincent Lefevre wrote:
> Subject: Re: Empty array and parameter expansion
> On Wed, Jun 10, 1998 at 10:26:51 -0700, Bart Schaefer wrote:
> > } % i=test
> > } % a=()
> > } % a=($a $i)
> > } % echo $a
> > } $i
> >
> > I don't understand it either, as it doesn't happen to me.
>
> After some tests... it happens only when RC_EXPAND_PARAM is set.
> But is it normal?
You want this patch, from zsh-workers article 3548 last November:
Index: subst.c
===================================================================
--- subst.c 1997/11/19 16:40:31 1.6
+++ subst.c 1997/11/19 16:44:41 1.7
@@ -1440,7 +1440,7 @@
}
if (plan9) {
uremnode(l, n);
- return NULL;
+ return n;
}
} else {
x = aval[0];
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-06-11 2:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-10 13:26 Empty array and parameter expansion Vincent Lefevre
[not found] ` <980610102651.ZM12101@candle.brasslantern.com>
1998-06-10 21:36 ` Vincent Lefevre
1998-06-11 2:30 ` 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).