zsh-workers
 help / color / mirror / code / Atom feed
* *$var*/* and recursive globbing
@ 2013-01-26 22:25 Stephane Chazelas
  2013-01-26 22:59 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Chazelas @ 2013-01-26 22:25 UTC (permalink / raw)
  To: Zsh hackers list

Hiya,

With zsh (but also ksh -G and bash -O globstar),

*"$var"*/* where $var is empty, expands like **/* while it
sounds to me like not the right thing to do. It can be worked
around by doing (*"$var"*)/*, but that requires extended_glob.

I would say that's a case where there's a fair chance to break a
perfectly correct POSIX script (considering that **/ is not
disabled in sh emulation).

I would be of the opinion that **/ (and ***/) should recurse only when
entered as is (or at least the two stars entered as is).

What do you think?
-- 
Stephane


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

end of thread, other threads:[~2013-01-27 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-26 22:25 *$var*/* and recursive globbing Stephane Chazelas
2013-01-26 22:59 ` Bart Schaefer
2013-01-27 19:04   ` Peter Stephenson

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