zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: mult_isarr bug
Date: Fri, 14 May 1999 08:44:30 +0200 (MET DST)	[thread overview]
Message-ID: <199905140644.IAA00293@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Thu, 13 May 1999 13:54:45 +0200


Peter Stephenson wrote:

> Am I going crazy or is this bug still in the latest version of the shell?
> 
> % dirs
> ~z/Src ~z ~/lgt/rz2 ~ ~/lgt/tfuzz /temp/pws ~/lgt/su2/cxx ~/tex/hep-lat
> /temp/pws/src
> % print ${$(dirs)[1]}
> ~
> 
> Wasn't this just fixed?

Oops. No, we have only handled nested parameter expansions, yet.

The `fix' for the above would be something like the patch below which
makes the result of $(...) be treated as an array if the whole thing
is not quoted. I think this is the right behavior, yes?

Bye
 Sven

--- os/subst.c	Mon May 10 17:23:08 1999
+++ Src/subst.c	Fri May 14 08:40:41 1999
@@ -99,6 +99,8 @@
     while (!errflag && *str) {
 	if ((qt = *str == Qstring) || *str == String) {
 	    if (str[1] == Inpar) {
+		if (!qt)
+		    mult_isarr = 1;
 		str++;
 		goto comsub;
 	    } else if (str[1] == Inbrack) {
@@ -249,6 +251,7 @@
  * The mult_isarr variable is used by paramsubst() to tell if it yields *
  * an array.                                                            */
 
+/**/
 static int mult_isarr;
 
 /**/

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


             reply	other threads:[~1999-05-14  6:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-14  6:44 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-05-13 11:54 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=199905140644.IAA00293@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).