Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `We Love Sven' Day Celebrated In Pisa
- X-seq: zsh-workers 5613
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: `We Love Sven' Day Celebrated In Pisa
- Date: Wed, 3 Mar 1999 09:03:34 +0100 (MET)
- In-reply-to: Peter Stephenson's message of Tue, 02 Mar 1999 14:59:35 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> Didn't we do this before? Maybe I missed applying a patch (in which case
> everyone else will have missed out by now, because it was a couple of weeks
> ago):
>
> % _foo() { local list='Hi mum!'; compgen -y '$list' -k '(foo bar)'; }
> % compdef _foo foo
> % foo ^D
> <lists rubbish>
>
> It's OK if $list is not local.
We had this for arrays and then I only saw the array created in
get_user_var() for scalar parameters and... We have to copy the value,
too, of course.
Bye
Sven
--- os/Zle/zle_tricky.c Wed Mar 3 09:03:29 1999
+++ Src/Zle/zle_tricky.c Wed Mar 3 09:03:43 1999
@@ -6845,7 +6845,7 @@
if ((val = getsparam(nam))) {
arr = (char **)ncalloc(2*sizeof(char *));
- arr[0] = val;
+ arr[0] = (incompfunc ? dupstring(val) : val);
arr[1] = NULL;
}
return arr;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author