From: Bart Schaefer <schaefer@brasslantern.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Eitan Adler <lists@eitanadler.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: globbing on symlink target
Date: Wed, 28 Feb 2018 12:59:05 -0800 [thread overview]
Message-ID: <CAH+w=7aZj5GWwOnSRVVmxK9c7MoiQyZJB6_UQfPMkzDxJSoitA@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3QPuo7mmsR1D7h8opwCzLQPBq_mfDem7=jojEk6zmA8-w@mail.gmail.com>
On Wed, Feb 28, 2018 at 11:31 AM, Mikael Magnusson <mikachu@gmail.com> wrote:
> On Wed, Feb 28, 2018 at 7:42 PM, Eitan Adler <lists@eitanadler.com> 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 ]]'^)
next prev parent reply other threads:[~2018-02-28 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 18:42 Eitan Adler
2018-02-28 19:31 ` Mikael Magnusson
2018-02-28 20:59 ` Bart Schaefer [this message]
2018-02-28 22:19 ` Mikael Magnusson
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='CAH+w=7aZj5GWwOnSRVVmxK9c7MoiQyZJB6_UQfPMkzDxJSoitA@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=lists@eitanadler.com \
--cc=mikachu@gmail.com \
--cc=zsh-users@zsh.org \
/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).