zsh-workers
 help / color / mirror / code / Atom feed
* Re: `We Love Sven' Day Celebrated In Pisa
@ 1999-03-03  8:03 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-03-03  8:03 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* `We Love Sven' Day Celebrated In Pisa
@ 1999-03-02 13:59 Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-03-02 13:59 UTC (permalink / raw)
  To: Zsh hackers list

Thought I'd introduce a little civilization to my bug reports:

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.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-03-03  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-03  8:03 `We Love Sven' Day Celebrated In Pisa Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-03-02 13:59 Peter Stephenson

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).