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 pmarek
Full name P.Marek
Date 2006-10-14 23:24:03 PDT
Message On Friday 13 October 2006 21:15 Gunter Ohrner wrote:
> Am Mittwoch, 11. Oktober 2006 17:19 schrieb Philipp Marek:
> > > As the manual does not mention this at all and there is no privision
> > > to achor a globbing paattern explicitely, I think this is a bug.
> >
> > I know that this makes sense in a way - but using a pattern
> > like "./directory/" ignores currently everything below this directory,
> > which makes sense, too.
> >
> > How about a flag or allowing $ at the end?
>
> Allowing a "$" at the end of the pattern would be ok, but not intuitive -
> usually globbing patterns in UNIX do not know about a "$" but are
> anchored automatically. A flag in contrast would be fine, and/or
> unanchored behaviour if the strings ends with a "/" - that'd be also fine
> in my eyes, as it would not unexectedly match substrings in filenames and
> still allow easily ignoring whole subtrees in a natural way. There's also
> still the possibility to write "./dir/**" although that looks awkward and
> isn't intuitive, either.
>
> I think I'd opt for anchoring iif the last character is no slash.
> Excluding directories but not their contents doesn't make sense anyway.
> And if one really wants to mach a substring of a filename, one can
> write "./**/*bla*" or stuff like this. If more complex paatterns are
> desirec, PCREs are the way to go, anyway, but globbing patterns are more
> common and easier readable for the day-to-day filename matching tasks,
> IMHO.
>
> However, independant of the solution which will be implemented it's
> neccessary to be able to anchor the patterns (if that won't become the
> default behaviour) and to extend the IGNORING document with a sentence or
> two explaining the choosen behaviour. :-)
I wholeheartly agree with you.

Do you have a patch that does all this, maybe :-?

--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

« Previous message in topic | 4 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: