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

Re: Recursive globbing



On 2004-05-14 09:10:13 -0700, Bart Schaefer wrote:
> No; please please don't do this.  Consider:
> 
> 	foo='x*'
> 
> 	print ${~foo}*
> 
> Or
> 
> 	bar="$foo*"
> 	print $~bar
> 
> Completely unexpected results.
> 
> Also it seriously breaks sh compatibility, so at the very least it should
> be disabled when SH_GLOB or similar options are in effect.
> 
> There's a reason that only **/ and not blather**/ is special.

Then there's a problem with **/ :

  foo='*'
  print ${~foo}*/

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



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