zsh-users
 help / color / mirror / code / Atom feed
* Another expansion (substitution?) question
@ 2003-07-08 17:57 Vin Shelton
  2003-07-09  4:42 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Vin Shelton @ 2003-07-08 17:57 UTC (permalink / raw)
  To: Zsh users

Sorry for more questions, but I can't quite figure this one out.

I have a short function that lists all the matching sub-directories
under a list of directories.  This single line is most of the
function:

    print -l ${^$(all_dirs)}/$=~^*(N/:t) | sort -u

I thought I'd like to get rid of the 'sort -u' process, but I can't do
it all in one step.  The following works:

    x=( ${^$(all_dirs)}/$=~^*(N/:t) )
    print -l ${(ou)x}

but when I try to remove the temporary assignment to x, here is what I
get:

    print -l ${(ou)${^$(all_dirs)}/$=~^*(N/:t)}
    zsh: bad pattern: emacs* o*(N

It looks to me that what is happening is that the / is being
interpreted as starting a substitution.  I've tried doubling and
tripling the /, and I've tried quoting the / with a \, but nothing has
produced the desired effect.

I'm running with the latest CVS version, but I see similar problems
with 4.0.7.

Thanks for your time,
  Vin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-09  4:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-08 17:57 Another expansion (substitution?) question Vin Shelton
2003-07-09  4:42 ` Bart Schaefer
2003-07-09  4:48   ` Vin Shelton

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).