-Search: exclude string also influences include string

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5986
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

-Search: exclude string also influences include string

Post by *white »

Searching for [*test text.txt*] (without the brackets) finds for example:

2test text.txt2
test
test text.txt
text.txt

Searching for [*test text.txt*|"2test text.txt2"] (without the brackets) only finds:

test
text.txt


See here for notes on how a search pattern is interpreted.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50865
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There is no bug.

*test text.txt*
means

*test
or
text.txt*
or
*test text.txt* <- this third one is only found when there are no more conditions, for the users who forget to set the double quotes.

because you didn't set any double quotes.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5986
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:this third one is only found when there are no more conditions
I think 100% of the users won't expect this.

Another example
search for: elvis presley*.txt
finds:
c:\lyrics\backup\elvis presley - Don't Be Cruel.txt
c:\lyrics\backup\elvis presley - Heartbreak Hotel.txt
c:\lyrics\backup\elvis presley - Hound Dog.txt
c:\lyrics\elvis presley - Don't Be Cruel.txt
c:\lyrics\elvis presley - Heartbreak Hotel.txt
c:\lyrics\elvis presley - Hound Dog.txt

search for: elvis presley*.txt|backup\
finds:
(nothing)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50865
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I prefer to keep it this way. I added the results for
"*test text.txt*"
when the user entered just
*test text.txt*
for the convenience of the user who doesn't read the docs. Users who know about | should be knowledgable enough to read the help.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5986
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:for the convenience of the user who doesn't read the docs. Users who know about | should be knowledgable enough to read the help.
The help says you don't have to use quotes. The | behavior (exclude) is not explained other than by examples. It does not state you have to use quotes when you specify an exclude condition.
TOTALCMD.CHM wrote:New: Names with spaces no longer need to be put in double quotes, e.g. Letter to Mr. Smith.doc. Total Commander now looks for both the entire name and the name parts individually.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50865
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have documented the current behaviour in the help now.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5986
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I have documented the current behaviour in the help now.
Tested OK using TC8.50rc1 32bit.
Post Reply