From: Bart Schaefer <schaefer@brasslantern.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>, jarausch@igpm.rwth-aachen.de
Subject: Re: breadth first globbing
Date: Tue, 31 Mar 2015 03:42:38 -0700 [thread overview]
Message-ID: <CAH+w=7a21cqth0=5JekdZokUkE7P45HgVVCi6=FX+2XAK03bQg@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3RitGhSJF_k0UwZH5TGXGWiMFCxn--F2-JpxDL3M4Akkw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
On Mar 31, 2015 3:05 AM, "Mikael Magnusson" <mikachu@gmail.com> wrote:
>
> On Tue, Mar 31, 2015 at 11:44 AM, Helmut Jarausch
> <jarausch@igpm.rwth-aachen.de> wrote:
> >
> > I have (unpacked) a directory tree where directories don't have the
executable bit.
> >
> > Standard globbing like **/*(/) doesn't work because zsh tries to cd to
the directories
> > before I can chmod +x these.
> >
>
> I would probably just chmod -R +x followed by chmod -x **/*(.)
Breadth-first globbing is **/*(/Od)
but in this case the problem is that globbing itself can't match anything
until the directory modes have changed, I think?
So I'd just do something like
while chmod +x **/*(/^x); do :; done
Assuming you have nomatch set so the loop will fail when all directories
have the x mode.
next prev parent reply other threads:[~2015-03-31 10:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 9:44 Helmut Jarausch
2015-03-31 10:04 ` Mikael Magnusson
2015-03-31 10:42 ` Bart Schaefer [this message]
2015-03-31 12:10 ` Mikael Magnusson
2015-03-31 10:53 ` Michal Politowski
-- strict thread matches above, loose matches on Subject: below --
2015-03-31 9:32 Helmut Jarausch
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=7a21cqth0=5JekdZokUkE7P45HgVVCi6=FX+2XAK03bQg@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=jarausch@igpm.rwth-aachen.de \
--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).