ignore: fuction (RFE)

Discussion related to "Everything" 1.5 Alpha.
Post Reply
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

ignore: fuction (RFE)

Post by therube »

ignore: fuction (RFE)
might be of value.


such that a search for, & more importantly (perhaps), an ascii sort of, ignore certain characters:
001 ext:txt ignore:ct-


returns:
001.txt
001-ct.txt
ct-001.txt

& sorts like:
001.txt
ct-001.txt
001-ct.txt

with "001.txt" & "ct-001.txt" being "equal" (as "ct-) is ignored.

not wanting to filter or rename, particularly, but i want "001.txt's" to appear "together",
be it named as "001.txt" or "ct-001.txt"


ignore:regex:^...

- ignore the first 3 characters


(And watch, someone will say, "you can do that already" ;-).)
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: ignore: fuction (RFE)

Post by raccoon »

You can do that already! :)

Thinking of it logistically though, and looking at your examples, I can't come up with the rules at play. Your Sorts Like examples don't seem like they should sort that way, since all 3 filenames should be SEEN as "001.txt" so their sort weights should be identical and non-changing. Why should '001-ct.txt' move from the middle position to the bottom position when sorted, then?
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: ignore: fuction (RFE)

Post by therube »

Because for sorting purposes, the "ct-001.txt" file "becomes" [ignore:ct-] "001.txt".

Cases where you may have say prefixed some file names - but not others, so you might have whole sets of files with "ct-" prefix & other that are simply numeric, where the files are the "same" (but not identical, in any other manner, necessarily).

And not just prefixes (or suffixes), but potentially any string could be ignored for the purposes of sorting file names.

That can put like files "together", even if their file names otherwise would have them in disparate (name sort) locations.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: ignore: fuction (RFE)

Post by therube »

ignore: (maybe) sortignore: ?

Search:
red_blue | redblue | rb_*


Results:
red_blue - description
red_blue - description 2
redblue - description
redblue - description 2
rb_description
rb_description2...
(but not just 6 results, but 100s or 1000s...)

And I'd like to see all my "description" & "description 2" & "description 3"... results displayed with some commonality - where a straight ascii sort would not.

And I want to see the results, sorted by "description".


With only the "pertinent" parts, the description, considered in the sort, then I can see that I have [red_blue] "description 99", [redblue] "description 99", & [rb_] "description 99" that are all related, & displayed together (rather then being 100 places apart from on another).

!PUNC helps with the case of "red_blue" & "redblue" - in finding files, but it does not help with a (sorted) display of the files.

Likewise I could change my search to
<red_blue | redblue | rb_*> 99
& that would find (& display together) all my "description 99" items, which is fine - as far as it goes. (And then I can change 99 to 91 to ...)

Better (IMO) is to be able to see all related items at once, sorted in a (more) meaningful manner (for a particular situation).


Now ignore: would apply to the SORT (display), not the SEARCH.
void
Developer
Posts: 16743
Joined: Fri Oct 16, 2009 11:31 pm

Re: ignore: fuction (RFE)

Post by void »

I will look into a 'sortname' property. (a property with punctuation and spaces stripped)
Thanks for the suggestion.

For now, you'll need to use regex group captures and sort by regmatch1:

regex:"(?:(?:red_blue - )|(?:redblue - )|(?:rb - ))(.*)"
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: ignore: fuction (RFE)

Post by therube »

(my lastest ramble on this...)

we can probably do this now, no ?

Code: Select all

a - ale   ->	    z - aka
a - ali   ->	    a - ale
a - ann   ->	    a - ali
k - ari   ->	    z - ama
k - sum   ->	    z - ana
k - zai   ->	    a - ann
z - aka   ->	    k - ari
z - ama   ->	    k - sum
z - ana   ->	    k - zai
so essentially a SORT /+4 kind of thing
(or [unix] sort -k 4)

regex:\w\s-\s(.*)
match: %1

1,5d(.*)
match %1

& throw that into a column so that it can then be sorted
(iow, i want to /sort/ by the 2nd "word", rather then the 1st)

---

I'll have to think about & trudge my way through this.
void
Developer
Posts: 16743
Joined: Fri Oct 16, 2009 11:31 pm

Re: ignore: fuction (RFE)

Post by void »

Please try the following search:

regex:\w\s-\s(.*) addcolumn:regmatch1 sort:regmatch1

leave out the addcolumn:regmatch1 part if you don't need this column.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: ignore: fuction (RFE)

Post by therube »

(forgot to copy my note, & i'll update, tomorrow or so...)

I'll just note...
regex:\w\s-\s(.*) sort:regmatch1
With something like that AND with a Filter enabled, say Audio,
and with sort by a column other then name, then selection
& drag&drop are (negatively) affected.

Selection (Shift+click &/or Ctrl+click) may or may not highlight correctly.
(May or may not display correct highlighting.
Selection Count is correct.)

Drag&drop only ends up dropping a single file.


Work around.
Use the Everything (rather then Audio) Filter, & add audio: to the search itself:
regex:\w\s-\s(.*) addcolumn:regmatch1 sort:regmatch1 audio:
Post Reply