zsh-workers
 help / color / mirror / code / Atom feed
From: Chris Hillery <cjh@ebt.com>
To: hzoli@cs.elte.hu
Cc: zsh-workers@math.gatech.edu
Subject: Re: Expansion bug?
Date: Fri, 7 Jul 1995 13:25:50 +0500	[thread overview]
Message-ID: <9507071725.AA06947@spot.EBT.COM> (raw)
In-Reply-To: <9507071544.AA16295@turan.elte.hu> (hzoli@cs.elte.hu)


Zoltan replyeth:
> Chris Hillery <cjh@ebt.com> wrote:
> >   set -A cdpath $ROOT/{$PROJ,${(j:,:)PROJ_LIST}}/src
> > 
> > This expanded via brace-expansion into a collection of paths like so:
> > 
> >  /root/project/src /root/a_proj/src /root/b_proj/src    etc.
>
> The proper way to do this in recent zsh releases is
> 
> set -A cdpath $ROOT/{$PROJ,${^PROJ_LIST}}/src

Nope, unfortunately this doesn't work either - or rather, it works TOO
well. What happens in that case is that I get the value in PROJ
repeated in front of every value in $PROJ_LIST, so (using my above
example) cdpath turns into

  /root/project/src /root/proj_a/src /root/project/src /root/proj_b/src

Which, as it happens, actually works fine for a cdpath; it's just
redundant and inefficient. (And cdpath gets real huge real quick when
$PROJ_LIST has 10 entries...)

> However your original method probably still works if glob_subst is set (I
> haven't tried). There was a bugfix which changed that.

However, THIS works just fine - it returned the functionality I had in
beta1. So far this is the only way I've found to get the behaviour I
want, although Soren sent me mail showing how I could get almost the
same behaviour with rcexpandparam set (it worked with the simple
$ROOT/$PROJ_LIST/src case, and I had to manually prepend
$ROOT/$PROJ/src).

So, thanks... :)  (Hopefully globsubst won't have any other unwanted
side-effects...) 

> Cheers,
>    Zoltan

-- 
Ceej
aka Chris Hillery
cjh@ebt.com


  reply	other threads:[~1995-07-07 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-06  9:36 Chris Hillery
1995-07-07 16:44 ` Zoltan Hidvegi
1995-07-07  8:25   ` Chris Hillery [this message]
1995-07-09 17:49     ` P.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=9507071725.AA06947@spot.EBT.COM \
    --to=cjh@ebt.com \
    --cc=hzoli@cs.elte.hu \
    --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).