zsh-users
 help / color / mirror / code / Atom feed
* zsh expansion fails if nocaseglob and not all directory components are listable
@ 2022-08-22 18:02 Oliver Freyermuth
  2022-08-22 19:05 ` Daniel Shahaf
  2022-08-22 20:14 ` Lawrence Velázquez
  0 siblings, 2 replies; 7+ messages in thread
From: Oliver Freyermuth @ 2022-08-22 18:02 UTC (permalink / raw)
  To: Zsh Users

Dear zsh'ers,

I'm not sure if this is a bug or a feature — but I have seen some zsh scripts break when the top level home directory (/home) is set to mode 711 and owned by root
(as is common for shared home directories offered via network at our site), when nocaseglob is active.

To reproduce locally, see the following example:

1) Prepare directory:

mkdir foo
chmod 711 foo
mkdir foo/test
sudo chown root:root foo
cd foo/test

2) Test with caseglob:
setopt caseglob
echo $(pwd)(N)

=> Output is returned just fine.

3) Test with nocaseglob:
setopt nocaseglob
echo $(pwd)(N)

=> No output is returned.

Of course, zsh can not exclude there are other directories directly inside "foo/" matching the given pattern (but with different case) since "foo/" can not be listed. However, at least the explicit match with case is known,
so I'm astonished zero matches are returned.

Is this expected, or a bug?

Cheers,
	Oliver

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

end of thread, other threads:[~2022-08-22 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 18:02 zsh expansion fails if nocaseglob and not all directory components are listable Oliver Freyermuth
2022-08-22 19:05 ` Daniel Shahaf
2022-08-22 20:14 ` Lawrence Velázquez
2022-08-22 20:59   ` Bart Schaefer
2022-08-22 21:36     ` Oliver Freyermuth
2022-08-22 21:56       ` Dominik Vogt
2022-08-22 22:01         ` Oliver Freyermuth

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