zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: small parameter fix
Date: Tue, 9 Mar 1999 11:12:42 +0100 (MET)	[thread overview]
Message-ID: <199903091012.LAA13671@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Tue, 9 Mar 1999 09:19:12 +0100 (MET)


I wrote:

> With the patch below we get:
> 
>   % echo ${$(uname -n)[1]}
>   beta
>   % echo "${$(uname -n)[1]}"
>   b
>   % echo ${${path}[1]}
>   /users/wischnow/bin/alpha
>   % echo "${${path}[1]}"
>   /
> 
> ...which seems sensible to me.

Grrr, this broke "${(@)$(foo)#...}" where the manual says that the
thing inside will be treated as an array if the `(@)' flags is given.

The patch at least fixes this. But maybe we should collect opinions
which expression should expand to what and then make the code produce
that.


Bye
 Sven

--- os/subst.c	Tue Mar  9 11:07:25 1999
+++ Src/subst.c	Tue Mar  9 11:10:13 1999
@@ -976,7 +976,8 @@
 	skipparens(*s, *s == Inpar ? Outpar : Outbrace, &s);
 	sav = *s;
 	*s = 0;
-	if (multsub(&val, ((quoted || aspar) ? NULL : &aval), &isarr, NULL) &&
+	if (multsub(&val, (((quoted || aspar) && !nojoin) ? NULL : &aval),
+		    &isarr, NULL) &&
 	    quoted) {
 	    isarr = -1;
 	    aval = alloc(sizeof(char *));

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-03-09 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-09 10:12 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-03-09 10:30 Sven Wischnowsky
1999-03-09  8:19 Sven Wischnowsky
1999-03-08  8:50 Sven Wischnowsky
1999-03-08  9:01 ` Bart Schaefer
1999-03-08 15:55   ` Peter Stephenson
1999-03-09  8:16     ` Andrej Borsenkow

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=199903091012.LAA13671@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).