Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing on symlink target
- X-seq: zsh-users 23186
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: globbing on symlink target
- Date: Wed, 28 Feb 2018 12:59:05 -0800
- Cc: Eitan Adler <lists@xxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4MCzVTIZVBXZ7xsPDdZVihm8sbKPKVqU7vJiQMpx5lA=; b=f0S54rAtV+xs83xSMozcfDTRN6YdEgAd5ozRrwS2FZDJe8zawEnZRVpQCTWkbw+Qx+ kckZuEY4oXvAXnZM5pKmalHqWJ7CYPHa0Pl+51L4IgPDISIhiMj3CPRcOYo8SXjaMtFX 5kdxIifcEsRqsRYqa1Za54q4y9kX6kq1yFV0v5gPYoYBFvX5ZZuPva3VvFQeyDnW8Zhu NnsybfWIbWyrv0KxHDDvbAMjkl3ez4Px3+BvbHTjt3UMgpkW7Hk0Cgip2vA2CUkBWEUH WZosrR1rWB+9EdI3DwQTjQFW3eEsb1DtH74NoaKYgIXiLyfQwMrE8AYMw0qGn0G8DSDj BjHg==
- In-reply-to: <CAHYJk3QPuo7mmsR1D7h8opwCzLQPBq_mfDem7=jojEk6zmA8-w@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAF6rxgm_c+xMds+rzrBtd7LFbU_-4wOSpr8gbz1-Hu-yY9dNCA@mail.gmail.com> <CAHYJk3QPuo7mmsR1D7h8opwCzLQPBq_mfDem7=jojEk6zmA8-w@mail.gmail.com>
On Wed, Feb 28, 2018 at 11:31 AM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On Wed, Feb 28, 2018 at 7:42 PM, Eitan Adler <lists@xxxxxxxxxxxxxx> wrote:
>> Is it possible to glob on a symlink target rather than the symlink
>> name.
>
> % ls -l *(@)
> lrwxrwxrwx 1 mikaelh users 3 Feb 28 16:50 broken -> foo
> lrwxrwxrwx 1 mikaelh users 3 Feb 28 20:27 broken2 -> bar
> lrwxrwxrwx 1 mikaelh users 3 Feb 28 20:27 hello -> foo
> % echo *(e*'local -A foo; zstat -LH foo $REPLY; [[ $foo[link] == foo ]]'*)
> broken hello
Should be easier than that -- using Eitan example of files with a
".rb" extension:
% ls *(@e^'[[ $REPLY:P = *.rb ]]'^)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author