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

Re: strange glob expansion

Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Sep 1, 10:11am, Hubert Canon wrote:
> } Subject: strange glob expansion
> }
> } I tried something like this :
> } 
> } % echo .scwm/(chan*|**/scwmrc*)
> Directory separators can't be used inside parentheses.  Parenthesized
> patterns match within one level of file hierarchy only.  (The '/' may
> still be useful when matching against strings, as in a `case' label, but
> doesn't work when globbing.)

On a related topic, the following puzzles me:

% cd /usr/lib/perl5/site_perl/5.005
% echo L*
LWP LWP.pm Lingua                 (letting you know what's there)
% echo L(*/)
zsh: no matches found: L(*/)      (why doesn't this match the 2 dirs?)
% echo L(*/)#
LWP LWP.pm Lingua                 (why does this match a file?)
% echo L(*/)z
LWP LWP.pm Lingua                 (HUH?)

The upshot of this is that to match all Perl modules starting with `L'
below the cwd, I have to use L{*/**/*,}.pm instead of L**/*.pm.

This is with zsh 3.1.6, no patches.

% uname -a
Linux pulse.localdomain 2.2.10-ac2 #1 Tue Jun 22 10:36:51 BST 1999 i686 unknown

P.S. Is there any movement on making an anonymous CVS tree available?
I'll have a few bug-fixing patchlets ready to submit to zsh-workers
soon, but the rate of development on the list is so ferociously high
that I can't keep up with all the patches.  There have probably been
20 or so already since pws-2!

P.P.S. What version would you rather have patches against?  3.1.6
clean?  The latest pws?

--- adam@xxxxxxxxxx --- musician and hacker --- http://www.new.ox.ac.uk/~adam/
echo '$_=bless[q]]],q;_;;sub s;{local$_=shift;push@$_,++$0,pop(@$_).$s;;$_}($,
=eval((join"\$_->[",qw)Just Another Perl Hacker)).q)$_->[1]]]])))=~s~((?<=.(?{
++$*})))?_::~$*&&$"~egx,print""=>""=>'|perl -ln0e';s;s\;;_::AUTOLOAD$1;g;eval'

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