Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing based on symlink contents
- X-seq: zsh-users 904
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: roderick@xxxxxxxxx (Roderick Schertler)
- Subject: Re: globbing based on symlink contents
- Date: Wed, 18 Jun 1997 16:16:45 +0100 (BST)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <4361.866645028@xxxxxxxxxxxxxxxxx> from "Roderick Schertler" at Jun 18, 97 10:43:48 am
Roderick Schertler wrote:
>It would be great to be able to glob based on the contents of symlinks.
>(That's not already possible, is it? I've been resorting to find.)
It's not already possible. And I think it would not be sufficient.
There will always be another way the people will want to glob. The only
really general way to do it is to glob using arbitrary shell code as
the criterion. How about a syntax like
linkmatch () {
local a
stat -L -A a $1
[[ "$a[14]" == $~2 ]]
}
echo *(f{linkmatch}{foo*bar})
?
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author