Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Another expansion (substitution?) question
- X-seq: zsh-users 6390
- From: Vin Shelton <shelton@xxxxxxxxxxxxxxxx>
- To: Zsh users <zsh-users@xxxxxxxxxx>
- Subject: Another expansion (substitution?) question
- Date: Tue, 08 Jul 2003 13:57:37 -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Teradyne, Inc
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author