From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Zach Riggle" <zachriggle@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Globbing symlinks-to-${glob_qualifier}
Date: Thu, 19 Aug 2021 00:38:11 -0400 [thread overview]
Message-ID: <55c3a12f-fa4e-48f0-813c-b5e60c3aab8d@www.fastmail.com> (raw)
In-Reply-To: <CAMP9c5kJ3CKdM4KiRTtUBuLNewUsH2usW3njqct2RhMOzwf8Jg@mail.gmail.com>
On Wed, Aug 18, 2021, at 10:32 PM, Zach Riggle wrote:
> Not sure what etiquette is for forking a thread on mailing lists, but
> I didn't want to disturb the other discussion on flags/options.
There isn't really a problem unless you go off on a tangent and the
"Subject" field becomes totally irrelevant, in which case you should
have changed it. Email is (ostensibly) an asynchronous medium, so
there's no need to wait until one exchange settles down before going
back to address a previous point, as long as you quote properly to
maintain context.
> How can I glob for all symlinks-to-symlinks-to-a-directory (etc)? I
> expected symlink-to-symlink might be *(@-@) but despite looking quite
> cute and similar to either Kirby or Jigglypuff (I can't decide).
Hm, I thought of another fictional character...
https://en.wikipedia.org/wiki/Billy_the_Puppet
> However, it doesn't in fact work and I'm just curious if there's more
> voodoo in that box.
The zshexpn(1) man page says this...
- toggles between making the qualifiers work on symbolic
links (the default) and the files they point to
...but it would be more accurate if it said "the files they fully
resolve to". So *(@-@) doesn't give you symlinks that themselves
point to symlinks, it gives you symlinks that *fully resolve to
symlinks*. AFAICT this only produces results when the symlink chain
is broken.
% ln -s /bin a
% ln -s a b
% ln -s b c
% ln -s c d
% printf '<%s>' *(@-/); echo
<a><b><c><d>
% printf '<%s>' *(@-@); echo
zsh: no matches found: *(@-@)
% rm a
% printf '<%s>' *(@-@); echo
<b><c><d>
I'll leave possible solutions to the more daring (and competent).
--
vq
next prev parent reply other threads:[~2021-08-19 4:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 3:27 Zach Riggle
2021-08-18 3:57 ` Daniel Shahaf
2021-08-18 4:02 ` Bart Schaefer
2021-08-18 13:10 ` Zach Riggle
2021-08-18 15:24 ` Bart Schaefer
2021-08-18 16:48 ` Ray Andrews
2021-08-18 17:23 ` Bart Schaefer
2021-08-18 17:55 ` Ray Andrews
2021-08-18 22:28 ` Which options are really doing anything (Re: Globbing symlinks-to-${glob_qualifier}) Bart Schaefer
2021-08-18 23:27 ` Ray Andrews
2021-08-19 2:32 ` Globbing symlinks-to-${glob_qualifier} Zach Riggle
2021-08-19 4:38 ` Lawrence Velázquez [this message]
2021-08-19 13:23 ` Daniel Shahaf
2021-08-19 13:25 ` Daniel Shahaf
2021-08-19 14:38 ` Ray Andrews
2021-08-19 13:54 ` Daniel Shahaf
2021-08-19 4:40 ` Bart Schaefer
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=55c3a12f-fa4e-48f0-813c-b5e60c3aab8d@www.fastmail.com \
--to=larryv@zsh.org \
--cc=zachriggle@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).