Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

*$var*/* and recursive globbing



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



Messages sorted by: Reverse Date, Date, Thread, Author