zsh-users
 help / color / mirror / code / Atom feed
* Glob specifiers for intermediate path components
@ 2014-11-26 17:32 Jörg Ziefle
  2014-11-26 18:00 ` Mikael Magnusson
  0 siblings, 1 reply; 5+ messages in thread
From: Jörg Ziefle @ 2014-11-26 17:32 UTC (permalink / raw)
  To: zsh-users

Suppose I have the following directory structure:

$ mkdir a
$ touch a/1
$ ln -s a b
$ ls -ld a b a/1
drwxr-xr-x  3 jozi  staff  102 Nov 26 18:27 a
-rw-r--r--  1 jozi  staff    0 Nov 26 18:27 a/1
lrwxr-xr-x  1 jozi  staff    1 Nov 26 18:27 b -> a

Globbing for files within directories, I get the file within the
directory pointed by symlink b too:

$ print -l */*(.)
a/1
b/1

How can I restrict the globbing for the first directory level to
directories only, excluding symlinks to directories? The obvious
doesn't work:

$ print -l *(/)/*(.)
zsh: bad pattern: *(/)/*(.)

More generally, how can I specify glob qualifiers for intermediate
path components? In spirit:

$ print -l a(...)/b(...)/c(...)/d(...)/e(...)/f(...)

where (...) denotes glob qualifiers for the respective path components, or even:

$ print -l {{a(...)/b(...)}/c(...)}


Thanks,

Joerg


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-27  5:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-26 17:32 Glob specifiers for intermediate path components Jörg Ziefle
2014-11-26 18:00 ` Mikael Magnusson
2014-11-27  1:52   ` Bart Schaefer
2014-11-27  4:27     ` Jörg Ziefle
2014-11-27  5:46       ` Bart Schaefer

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).