Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: ignore globbing patterns are not anchored

fsvs
Discussion topic

Back to topic list

Re: ignore globbing patterns are not anchored

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2006-10-27 12:38:18 PDT
Message 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*tin​g\*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:c7j6gq$6rr​$04$1@news.t-onlin​e.com>
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschl├╝sselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

« Previous message in topic | 9 of 11 | Next message in topic »

Messages

Show all messages in topic

ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-10 14:48:18 PDT
     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-11 08:19:37 PDT
         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-13 12:15:41 PDT
             Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-14 23:24:03 PDT
                 Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-15 08:03:09 PDT
                 Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-26 09:56:29 PDT
                     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 04:46:45 PDT
                         Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 05:13:19 PDT
                         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-27 12:38:18 PDT
                     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 05:13:19 PDT
                         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-27 12:41:41 PDT
Messages per page: