parsing - errors detected by Everything while parsing a search string?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

parsing - errors detected by Everything while parsing a search string?

Post by ChrisGreaves »

CURIOSITY VALUE ONLY:

Code: Select all

exdt:bat 
Well, yes, I meant to specify

Code: Select all

ext:bat 
because I am about to perform a content: search on my DOS Batch files.

That "exdt:bat" returns no items, but I am curious about the parser.
Supposing that there exists no search function "exdt"
What does the parser do when it finds the colon?

I expected the parser to say "Hang about! We have no such function as exdt, and it is clearly supposed to be a function because the string "exdt" is immediately followed by a colon"

In a programming language i would expect the interpreter or compiler to throw up an error message to the programmer.
Obviously Everything does not report my clumsy typing as an error, but:-
(1) Could it do so if it wanted?
(2) Is there some other behaviour that Everything can use when it meets, what to me, looks to be illegal? If so what?

In my simple example above I was, of course, VERY surprised to find that my extensive collection of batch files had disappeared! Closely followed by my seeing the typo.

But had I added "exdt:bat" and a few other terms to a more complex search string, how I would I think to look for my typo, instead of thinking "OK, zero results, so I don't have anything that matches <a long and complex search string>.

Thanks, Chris
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: parsing - errors detected by Everything while parsing a search string?

Post by void »

If there's no matching search function, search modifier or marco, Everything will look for the search term in the filename.

Consider the following valid filename:

exdt:bat




It's not an error to search for exdt:bat
Filenames can contain :



I know it's unlikely you'll have a file named exdt:bat
I will consider an info bar that shows a "did you mean ext:bat" suggestion.
Phlashman
Posts: 41
Joined: Sun Sep 11, 2022 4:57 am

Re: parsing - errors detected by Everything while parsing a search string?

Post by Phlashman »

A web search implies "A colon is an invalid character for a Windows file name"?

If the file system is Windows, should "exdt:bat" not be seen as invalid?

If there are filenames with a ":" in the filename, how does one find them?

Thanks
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: parsing - errors detected by Everything while parsing a search string?

Post by void »

To clarify:

0xFF1A Fullwidth Colon Unicode Character:

Is a valid filename character.


0x003A Colon Unicode Character:
:

Is not a valid filename character.

:
will match
when diacritic matching is disabled (Search -> Diacritics)



Everything can have
:
in filenames via File lists and Virtual Folders.


If there are filenames with a ":" in the filename, how does one find them?
Search for:

:
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: parsing - errors detected by Everything while parsing a search string?

Post by ChrisGreaves »

void wrote: Fri Jul 12, 2024 11:07 pm If there's no matching search function, search modifier or marco, Everything will look for the search term in the filename.
Thanks Void. That answers my question and satisfies my curiosity. A typo falls back into being a (potential) component of a file name.
I will consider an info bar that shows a "did you mean ext:bat" suggestion.
Ah! Please No! Not on my behalf.
Not a suggestion.
If any changes were to be made, I'd be content for life (I promise) with just a simple pop-up "ERR" message. I will not be wanting a crossword-puzzle solver in Everything.

Cheers, Chris
Post Reply