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

Re: on globbing dot files



On Wed, May 07, 2008 at 02:51:35PM +0100, Peter Stephenson wrote:
> "Ronald Fischer" wrote:
> > I would like to expand * to include files starting with a dot, but 
> > excluding . and ..
> > 
> > Doing a
> > 
> >   setopt glob_dots 
> > 
> > locally does not solve this problem, since this applies to *everything*.
> > Is there a suitable option available? Alternatively, can I achieve an
> > expansion
> > to all directory entries except . and .. by some other glob expression?
> 
> With EXTENDED_GLOB, ^(.|..)(D/) should do what you want.
[...]

And with and without EXTENDED_GLOB, *(D/) should do it as well
;-) as globbing in zsh never expands to "." and "..".

-- 
Stéphane



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