zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: `We Love Sven' Day Celebrated In Pisa
Date: Wed, 3 Mar 1999 09:03:34 +0100 (MET)	[thread overview]
Message-ID: <199903030803.JAA20627@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 02 Mar 1999 14:59:35 +0100


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


             reply	other threads:[~1999-03-03  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  8:03 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-03-02 13:59 Peter Stephenson

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=199903030803.JAA20627@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).