[TC 11.03] Search for | *\ with leading spaces

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

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

[TC 11.03] Search for | *\ with leading spaces

Post by *white »

Search for files with name "a" or "b", do not search in subfolders:

Code: Select all

  a     b   | *\
Search for all files, do not search in subfolders:

Code: Select all

| *\
Search for all files, do not search in subfolders:

Code: Select all

 | *\
The last search text, containing 1 or more leading spaces, is not working.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *ghisler(Author) »

You need to put names with spaces in double quotes, e.g.
*.* | " *\"
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *petermad »

2ghisler(Author)

I think White expects expects all leading or trailing spaces to be ignored if there are no quotes
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *white »

ghisler(Author) wrote: 2024-07-08, 13:56 UTC You need to put names with spaces in double quotes, e.g.
*.* | " *\"
LOL, that's excluding traversing folders starting with a space. As I said I wanted to: "Search for all files, do not search in subfolders".
petermad wrote: 2024-07-08, 14:19 UTC I think White expects expects all leading or trailing spaces to be ignored if there are no quotes
Exactly, the last 2 code blocks should do the same.
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *jonathanpoulin »

If I can add to this topic...

Maybe it would help solving potential bugs.

Here are some use cases I tested:
  1. Empty mask (i.e. blank Search field): Should returns all files/directories (working)
  2. Empty (two double-quotes) mask:

    Code: Select all

    ""
    Should returns all files/directories as well (working)
  3. Empty mask with empty exclude mask (i.e. pipe character in Search field):

    Code: Select all

    |
    Should returns all files/directories as well (NOT working)
  4. Empty (two double-quotes) mask with empty exclude mask:

    Code: Select all

    ""|
    Should returns all files/directories as well (NOT working)
  5. Empty (two double-quotes) mask with empty (two double-quotes) exclude mask:

    Code: Select all

    ""|""
    Should returns all files/directories as well (NOT working)
  6. Empty (as spaces) mask with empty exclude mask:

    Code: Select all

      |          <=== 2 leading spaces
    Should returns all files/directories as well (NOT working)
  7. Empty (as spaces) mask with empty (as spaces) exclude mask:

    Code: Select all

      |            <=== 2 leading/trailing spaces
    Should returns all files/directories as well (NOT working)
Thanks,
Jonathan Poulin
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *white »

jonathanpoulin wrote: 2024-07-11, 15:09 UTC Here are some use cases I tested:
A pipe symbol doesn't change the search mode, so in this case the pipe is interpreted literally and not as a separator for an exclude section. Take a look at the example "Smith | txt" here: https://www.ghisler.ch/wiki/index.php?title=Search.
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *JOUBE »

white wrote: 2024-07-08, 16:56 UTC
ghisler(Author) wrote: 2024-07-08, 13:56 UTC You need to put names with spaces in double quotes, e.g.
*.* | " *\"
LOL, that's excluding traversing folders starting with a space. As I said I wanted to: "Search for all files, do not search in subfolders".
It's OK as it is implemented now and doesn't need to be changed. So there's no reason to ridicule it.

Jou"That's only happened over the years on the forum when regulars got impatient and so on."be
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *jonathanpoulin »

white wrote: 2024-07-11, 15:37 UTC
jonathanpoulin wrote: 2024-07-11, 15:09 UTC Here are some use cases I tested:
A pipe symbol doesn't change the search mode, so in this case the pipe is interpreted literally and not as a separator for an exclude section. Take a look at the example "Smith | txt" here: https://www.ghisler.ch/wiki/index.php?title=Search.
Ahh, ok I see. Sorry. I think I will keep the wiki open for a while! lol!

Shouldn't we adjust the .chm file with the wiki infos then?

So, my bullet points 3 to 7 of my previous post are invalid assumptions. That is okay the way it is implemented right now. Good!
Thanks,
Jonathan Poulin
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.50 beta 1, please check it!
17.07.24 Fixed: Find files: Ignore any leading and trailing spaces in wildcard searches except when they are in double quotes, e.g. *.txt *.docx now needs to be "*.txt " *.docx (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *white »

ghisler(Author) wrote: 2024-10-09, 14:03 UTC This should be fixed in Total Commander 11.50 beta 1, please check it!
Tested OK using TC 11.50b1 32-bit and 64-bit.
ghisler(Author) wrote: 2024-10-09, 14:03 UTC
17.07.24 Fixed: Find files: Ignore any leading and trailing spaces in wildcard searches except when they are in double quotes, e.g. *.txt *.docx now needs to be "*.txt " *.docx (32/64)
The code:

Code: Select all

*.txt  *.docx
already did not work to find files with extension ".txt " (with trailing space), so your bug fix description is wrong. Spaces were already ignored, but not in all circumstances.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *ghisler(Author) »

What description would you suggest?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *white »

ghisler(Author) wrote: 2024-10-10, 08:27 UTC What description would you suggest?
Perhaps this:
17.07.24 Fixed: Find files: Spaces were not always ignored in wildcard searches when they were not in between double quotes (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *ghisler(Author) »

I have updated the description in 11.50 beta 2, please check!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] Search for | *\ with leading spaces

Post by *white »

ghisler(Author) wrote: 2024-10-16, 13:04 UTC I have updated the description in 11.50 beta 2, please check!
Confirmed.

Moderator message from: white » 2024-10-16, 14:45 UTC

Moved topic
» from TC11.x bug reports (English) to TC Fixed bugs
Post Reply