zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Zoltan Hidvegi <hzoli@frontiernet.net>,
	zsh-workers@math.gatech.edu (Zsh hacking and development)
Subject: Re: RC_EXPAND_PARAM final patch
Date: Sat, 2 Aug 1997 12:28:13 -0700	[thread overview]
Message-ID: <970802122813.ZM5067@candle.brasslantern.com> (raw)
In-Reply-To: <199708020727.DAA03172@hzoli.home>

On Aug 2,  3:27am, Zoltan Hidvegi wrote:
} Subject: RC_EXPAND_PARAM final patch
}
} There is still one point where the behaviour might be surprising: that's
} when the (e) substitution flag is used:
} 
} % echo ${x}1${(e)^a}2${x}
} x y1a2x y y1b2x y

I get very strange behavior from this.  Vis:

zagzig<25> a=('$[i++]' '$[i++]' '$[i++]')
zagzig<26> i=0
zagzig<27> echo ${^x}1${a}2${^x}
x1$[i++] y1$[i++] z1$[i++] $[i++] $[i++]2x $[i++]2y $[i++]2z

OK so far, but:

zagzig<28> i=0
zagzig<29> echo ${^x}1${(e)a}2${^x}  
x10 y10 z10 $[i++] $[i++]2${^x}

Huh?  Why didn't it evaluate the second ${^x}, which is unquoted and at
the same (re)interpretation level as the first ${^x} ?  I would at least
have expected to get

x10 y10 z10 $[i++] $[i++]2x $[i++]2y $[i++]2z

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1997-08-02 19:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-02  7:27 Zoltan Hidvegi
1997-08-02 19:28 ` Bart Schaefer [this message]
1997-08-04 14:28 ` Andrej Borsenkow
1997-08-04 16:02   ` Peter Stephenson
1997-08-04 17:21   ` Zoltan T. Hidvegi
1997-08-04 18:39     ` Bart Schaefer
1997-08-04 18:51       ` Zoltan T. Hidvegi
1997-08-04 19:10         ` Bart Schaefer
1997-08-06 12:27     ` Andrej Borsenkow
1997-08-07  3:53       ` Zoltan T. Hidvegi

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=970802122813.ZM5067@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=hzoli@frontiernet.net \
    --cc=zsh-workers@math.gatech.edu \
    /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).