From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6353 invoked from network); 3 Mar 1999 08:04:42 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Mar 1999 08:04:42 -0000 Received: (qmail 6061 invoked by alias); 3 Mar 1999 08:04:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5613 Received: (qmail 6050 invoked from network); 3 Mar 1999 08:04:21 -0000 Date: Wed, 3 Mar 1999 09:03:34 +0100 (MET) Message-Id: <199903030803.JAA20627@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Tue, 02 Mar 1999 14:59:35 +0100 Subject: Re: `We Love Sven' Day Celebrated In Pisa 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 > > > 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@informatik.hu-berlin.de