Re: Added find.exclude
"'Neil Hodgson' via scite-interest" <[email protected]>
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
Lorenzo Donati:
> Wouldn't it be better to discriminate directories by adding a final slash/backslash?
>
> e.g. "debug/"
It would be more code. If someone wants to implement it, it can be included.
> Otherwise it would be impossible to avoid searching in files that have no extensions. E.g. how would one avoid searching inside a file simply named "makefile" or "README"?
With
find.exclude=makefile README
Both files and directories that match the patterns are excluded. So if you are excluding the "release" directory you’ll also miss a file called "release".
> Moreover, how complex is the supported pattern syntax? Is it just a shell glob or does it support regular expressions (e.g. like the search/replace dialog)?
These are the extremely simple patterns with just "?" and "*" also allowed for the set of files to search. Its implemented by PatternMatch in FilePath.cxx.
There is another implementation of pattern matching in PathMatch.cxx that was done for EditorConfig support but it is more complex and would change the interpretation of patterns. It includes relative path matching, sets of characters, alternates, and numeric ranges.
https://editorconfig-specification.readthedocs.io/#glob-expressions
Again, this would be more work so if someone wants to do it …
Neil
--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/9D12EF1A-7A5E-4056-BCA5-1C59596056D0%40me.com.