ColorFiltering exact paths

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

ColorFiltering exact paths

Post by SkyFrontier »

v13.10.0001 - 2013-10-10 20:45
...
! Color Filters: Name filters stated as slashed paths never matched
anywhere. Fixed. Now you can pass "D:\Test\"(or "D:\Test") as a
filter and it will color this one path.
How do I make this work as stated on latest versions...?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: ColorFiltering exact paths

Post by kunkel321 »

Interesting. I was just experimenting.
I made an empty folder, which is,

Code: Select all

C:\Test
Then made the corresponding Color Filter definition (without the ending slash).
It matched the folder and also matched a file in my C drive that happened to be there, "C:\test.xml"

But then I put the slash at the end and it still matches both.
The ending slash should make it NOT match the xml file, correct?

Image
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: ColorFiltering exact paths

Post by TheQwerty »

This is actually working as designed* based on this change:

Code: Select all

v13.20.0011 - 2013-11-09 13:42
    . . .
    * Color Filters: Now Name and Dir patterns support Loose Match, i.e. 
      wildcards (*) are internally auto-added left and right of a 
      pattern if no wildcards (* or ?) are contained in the pattern. So 
      "cat" will now match "wildcat.txt"; before you needed to state 
      "*cat*".
      FYI, this is in analogy to Visual Filters which support this since 
      20060830.
Prefixing the pattern with a '*' makes it work as you desire, because this disables the loose matching.

So to just color C:\Test you want a pattern of *C:\Test

EDIT: Though XY might be able to more smartly handle a trailing '\' in these cases. /edit.


* It's arguable whether it's a good design decision. As it stands now the rules are simpler and thus more easily documented. Perhaps it would be better if the loose match also checked for ':\' before surrounding the pattern in wildcards? ('\' only would impact '\test\') In any case it might help for the examples to include:

Code: Select all

C:\Windows       -> matches C:\Windows, all items that are located in C:\Windows, and also C:\WindowSill and its contents. (Same as *C:\Windows*)
*C:\Windows     -> matches C:\Windows only.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: ColorFiltering exact paths

Post by SkyFrontier »

Thanks, TQ.
Traversed history.txt high and low but couldn't find a way to achieve that.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply