Am Freitag, 27. Oktober 2006 13:46 schrieb Ph. Marek:
> > dir_ignore
> I believe that dir_ignore is just the name of the patch?

Yes. I do not say that it's a paticularily clever or fitting one... ;)

> > My first try was to simply anchor all patterns except patterns ending
> > in '/', but that caused all directories I wanted to ignore to be
> > included. (However, without their contents.) It would have been
> > neccessary to explicitely exclude the directory as well, so I changed
> > to behaviour to the one explained above.
> >
> > This feature has one drawback: ./**/tmp/ will also ignore all FILES
> > which are exactly called "tmp", not only the dirs. :-/

> That's not so nice.

Right.

> How about changing the path generation to include a "/" at the end for
> directories? Then this would work, too -- and the pattern would not
> have to be "(/|$)".

That was my first "solution", as stated above. It was the simplistic 
solution I originally had in mind.

However, in this case './**/tmp/' did not match the empty directory 
itself, so to exclude the directory itself a second pattern './**/tmp' 
had to be added - and this would also irgnore all files named "tmp", not 
only all directories, so it would be no improvement over my patche's 
current behaviour, in my eyes. The problem here is that the glob patterns 
are purely name-based and do not regard the file's type. (Additionally, 
paattern matching behaviour depending on the type of files would also not 
be what the user expects and thus would not be exactly "intuitive"...)

To ignore a ddirectories contents, but not the directory itself, you can 
write './**/tmp/**' instead of './**/tmp'. Just ignoring directories with 
a specific name but bot files with exactly the same name currently is not 
posssible, with neighter version of the patch nor with the current 
implementation.

> > You can now write stuff like
> >   ./**/\[is[_.-]this[_.-]an_intereres*ting\*filename\?[]!]?
> > and it should work as expected.
> Note that I didn't know what to expect from that for some time ;-)

Hey, that's why fsvs does it for you. ;)

Ok, it's a rather extreme example... ;)

> I think that they are a big step forward. I'll give them a try ASAP.
> Thank you for this work!

No problem, I'm happy if I can help to improve fsvs.

Greetings,

  Gunter

-- 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> Beim Thema Jungfrauen empfehle ich rwth.informatik.* !
Ich glaub er meinte mit Jungfrauen nicht Frauen, die wie Jungs aussehen 
;-)
        -- <news:[EMAIL PROTECTED]>
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                   PGP-verschlüsselte Mails bevorzugt!                 +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Attachment: pgpPqE333Dal2.pgp
Description: PGP signature

Reply via email to