QuickSearch eXtended

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-05-31, 12:06 UTC

I made a big suggestion thread for changes in tcmatch.dll here.
It includes all suggestions made here.
j wrote:You can not type ^[ to start an expression in a box bracket. I guess because it tries to match files with [ (or because it's an invalid expression) and does not let me continue to type. It would be good to filter a [ if it is the last character and does not have a \ before it, so you could still end an expression with \[.
I think Mr. Ghisler should change this. There would be thousands of rules for me.
(As a workaround you can right now write the complete regex in notepad and paste it via context menu)
m^2 wrote:-Ini would be really useful. To enable reg exps by default, without '?'
-Sources. Can you change paths to relative ones?
-Bug: In reg exp mode, it doesn't accept space to make multiple searches. Example: "?h " in the main TC directory.
Will see whats possible.
1. Ok. I will use a entry like:

Code: Select all

google_search_activate_char=
regex_search_activate_char=?
So it would be possible to customize it for everyone needs. For example with a ">" sign for RegEx.
2. You mean the path of the dll? Yes I will correct it. Ghisler startet it. :-)
3. Its no bug, its a not written feature. ;)
Till now the google like search was only meant for regex.

Another planned entry for the ini file is:

Code: Select all

case_sensitive=1/0
Do you have any other useful entrys?

User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-05-31, 13:07 UTC

Regarding the ini file:
There will be trouble for the location, because Files I create relative are put in the current directory where the files are filtered. Dont know why.

So I have to use the registry:
[HKEY_CURRENT_USER\Software\Ghisler\Total Commander\InstallDir]

Any other thoughts?

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2009-05-31, 13:18 UTC

Because it's TC's current directory? :P
Use %COMMANDER_INI%.

j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j » 2009-05-31, 13:24 UTC

You could use something like:

Code: Select all

WCHAR buff[4096];
GetEnvironmentVariable(L"COMMANDER_INI", buff, 4096);
wstring path(buff);
int pos;
if((pos = path.find_last_of('\\')) != string::npos)
  path = path.substr(0, pos+1);
else
  path = "";

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2009-05-31, 14:05 UTC

This search extension interface isn't really suited for regular expressions, because you cannot type a character when there is no match. So what you need to do is return true for all files if a certain regular expression is invalid, so the user can continue to type text.
Author of Total Commander
http://www.ghisler.com

User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-05-31, 15:06 UTC

2ghisler(Author):
But you could change it, so that it will be possible to write something, even if there are no matches in the file list at all.
Please. :)

Would be easier I think.

User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-05-31, 23:53 UTC

Updated first post: Version 1.0 is available.
  • Added an similarity search. (Levenshtein)
  • Added google like search for RegEx.
  • Added a workaround for open, but not closed parenthesis. ("()[]{}")
  • Added support for an ini file. (activation chars, case sensitivity)
  • Fixed absolute paths in source.
2j:
Thx for the suggestions and the code snippet.

2m^2:
Thx for the suggestions.

Hope it suits your needs.

User avatar
fenix_productions
Power Member
Power Member
Posts: 1956
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions » 2009-06-01, 00:14 UTC

2Samuel

That is great! I am truly amazed by your effort.

One suggestion: descript.ion support (matching comments assigned to files and not filenames themself).
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2009-06-01, 06:49 UTC

fenix_productions wrote:2Samuel

That is great! I am truly amazed by your effort.

One suggestion: descript.ion support (matching comments assigned to files and not filenames themself).
You inspired me.
A time consuming, but IMO worthwhile request: support for wdx plugins.
wdx_super is open source and implements it, so you don't have to fully implement it, just port and update for Unicode. Or maybe there is some open C++ implementation already? FileDescriptions.wdx?

And it will fit very well your current .ini format - just a special character to start a wdx search. Would probably require some aliases to be really quick though. :)

OK, now I'm going to try the latest version.:)

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2009-06-01, 07:05 UTC

Can't make it work.:(
config:

Code: Select all

[general]
google_search_activate_char=/
regex_search_activate_char=
leven_search_activate_char=<
case_sensitive=0
In the main tc dir I type ".o" and it doesn't accept o.
Also, I could tell it before, but somehow didn't think about it:
google_search_activate_char. I think that simple_search... would be a better name, since regex works like google too.
EDIT: wait! I got it!
It's an installation bug: it copies .ini to the main TC dir and then searches for it in the config dir. I think it would be better if you didn't bundle the ini with the installer but create it at the first start. It would prevent some confusion.

User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-06-01, 07:26 UTC

I dont want to create the ini with the dll. If someone doesnt want an ini, he should be able to delete it. (so it will not come again) -> presets from the dll are used.

Edit: Is it possible to copy it at the install to the directory of the wincmd.ini?
Should I search for the ini in path of wincmd.ini and afterwards in TC-directory. (If it was not found)

User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo » 2009-06-01, 07:43 UTC

Couldn't you use this?

%COMMANDER_INI%

And then just put in INI file where that leads to.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license

User avatar
Samuel
Power Member
Power Member
Posts: 1871
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2009-06-01, 07:49 UTC

I do in the dll. But AFAIK the TC-auto-install has no option for this.

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2009-06-01, 07:59 UTC

Yes, autoinstall copies all files to one place.

User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo » 2009-06-01, 08:06 UTC

How do some of the plugins do it? I have some plugin INIs in my TC INI directory, which is on drive D (my backup drive).
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license

Post Reply