Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unreadable directories aren't included in glob expansion
- X-seq: zsh-users 24620
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: Unreadable directories aren't included in glob expansion
- Date: Thu, 9 Jan 2020 15:51:41 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200109155142euoutp02a09167f0372b38e0e33a8f9c743bb557~oQsmOlOSD0062600626euoutp02y
- In-reply-to: <20200109154145.rqksfenozx6745rn@tarpaulin.shahaf.local2>
- 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: <CGME20200109154313eucas1p13b2e5465f21d059ea08537012e140236@eucas1p1.samsung.com> <20200109154145.rqksfenozx6745rn@tarpaulin.shahaf.local2>
On Thu, 2020-01-09 at 15:41 +0000, Daniel Shahaf wrote:
> Consider:
>
> % mkdir foo
> % mkdir -m 000 bar
> % echo */
> foo/
> % echo *(/)
> bar foo
> %
>
> Shouldn't the expansion of «*/» include «bar/»?
Certainly, */ and *(/) have always been inconsistent and I don't know of
any fundamental reason why that needs to be.
At a practical level, the difference may have arisen because a / not in
a glob qualifier is usually present in order to select files within the
directory, which won't work if the directory isn't readable. A glob
qualifier, on the other hand, always applies to the final path segment.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author