Variable Delimiter option - for wider application compatibility

Have a suggestion for "Everything"? Please post it here.
Post Reply
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Variable Delimiter option - for wider application compatibility

Post by juzzle »

I have a lot of programs that creat/maintain lists with different delimiters than pipes "|" for example "," (JSON, CSV). Is it possible to set your preferred delimiter for use when searching for multiple strings?, eg

"c:\" ThisFile,ThatFile,AnotherFile
"c:\" ThisFile(ThatFile(AnotherFile
"c:\" ThisFile•ThatFile•AnotherFile

Rather than the stock way as follows which requires search & replace operations on text from externally delimited sources:

"c:\" ThisFile|ThatFile|AnotherFile

It would be awesome if we could.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Variable Delimiter option - for wider application compatibility

Post by therube »

Not quite following what you're wanting?

Do note that the results returned, based on your query, will depend on: Tools | Options | General | Search -> Operator precedence:
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

Not quite following what you're wanting?
I am suggesting that custom delimiters be allowed to be set, rather than the default (and only) current delimiter "|"
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Variable Delimiter option - for wider application compatibility

Post by raccoon »

But, the pipe character is an ILLEGAL CHARACTER for paths and filenames, and it has a very familiar connotation for OR OPERATION, which makes it a double-win. It's an excellent choice. Why can't you just search-and-replace your comma, tab, w/e delimiters with pipes on your own dime?
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

Why can't you just search-and-replace your comma, tab, w/e delimiters with pipes on your own dime?
I agree with your comments, however, with frequent exchange of find sets between JSON & CSV and Everything, the process becomes somewhat tiresome. :?
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Variable Delimiter option - for wider application compatibility

Post by raccoon »

If this is JSON data, then how should Everything handle escaped commas, quotes, etc valid filename characters that are invalid in JSON? Should Everything also handle unescaping these? I'm not one to lightly trample on someone's feature suggestions, but you can see where this leads. I presume if you're already handling JSON queries yourself, there's a certain scripting interface you have access to since JSON isn't an end-user data format, but exclusive to the realm of software programmers.
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

Notepad++ parses JSON nicely. But I can see I am flogging a dead horse here, perhaps due to my limited understanding of "escaping-out" of something. Can I escape these thread? :) .. I'll let this one rest - would have been nice, but there are bigger fish to fry.
void
Developer
Posts: 16739
Joined: Fri Oct 16, 2009 11:31 pm

Re: Variable Delimiter option - for wider application compatibility

Post by void »

The next major version of Everything will accept , and ; as delimiters by default.

Double quotes can be used to escape , or ;
For example:
abc,123,"a filename with a , comma"
abc;123;"a filename with a ; semicolon"
abc,123;"a filename with a , comma","a filename with a ; semicolon"

A pipe (|) will be allowed as a delimiter when quoted.
For example:
"abc|123|a filename with a , comma|a filename with a ; semicolon"

The pipe (|) outside quotes is treated as OR, breaking the current search term.

ext:, filelist: and exclude filters will use this new list format.

You will be able to escape a double quote with &quot:
Although, a quote is an invalid character for filenames on Windows.

I like the idea of specifying the delimiter... added to my TODO list.
Thank you for your suggestions.
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

Thanks David @void - that's excellent news.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Variable Delimiter option - for wider application compatibility

Post by therube »

Color me confused?

Are we talking about content: when searching within files?
Or are we talking about exporting a list of file names to various types of files (a file list)?
Or are we talking about reading a file list into Everything & in that file list the words can be deliminated by , & ;?
Or?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Variable Delimiter option - for wider application compatibility

Post by NotNull »

This is what I made of it:

@juzzle has some external program that exports data in the format
ThisFile,ThatFile,AnotherFile
and he/she wants to copy/ paste that in Everything so that the search will be
"ThisFile"|"ThatFile"|"AnotherFile"


One way to implement this could be a "Paste Special" (context) menu entry.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Variable Delimiter option - for wider application compatibility

Post by raccoon »

I'm confused now too. Does this mean I have to escape my commas to make them work as normal filename commas now, otherwise they behave as pipes?
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

I'm confused now too. Does this mean I have to escape my commas to make them work as normal filename commas now, otherwise they behave as pipes?
I am not sure - that's a question for @void
void
Developer
Posts: 16739
Joined: Fri Oct 16, 2009 11:31 pm

Re: Variable Delimiter option - for wider application compatibility

Post by void »

For future versions of Everything:

filelist: and ext: can use , or ; or | as a delimiters.

OP is referring to a custom OR operator.
You will also be able to specify a custom OR operator in a future release of Everything.

For example, you might be able to do something like the following:
type in the following and press enter:
/or_op=,
search for abc,123
which Everything would see as abc OR 123.

However, the preferred method will be searching with the filelist: modifier, eg:
filelist:file1.txt,file2.txt,file3.txt
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: Variable Delimiter option - for wider application compatibility

Post by juzzle »

Brilliant! -I believe this will be a really handy expansion of flexibility
Post Reply