Scripts discussion (2)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FindFiles.js
Added: click on header of files list - sort files ascending/descending.
Added: option in settings "Show full path on files list".
Fixed: run time error if double click on empty files list.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ, can You add multiple wildcards search? Separated by semicolon like "*.h*; *.c*".

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre
#1
Now you can do this using regular expression eg:
\.(h|c)[^\.]*$

#2
Some programs use to multiple wildcards search a list of items separated by semicolon or space.
But both semicolon and space can be included in the file name.
In this way, we do not find a file whose name contains a semicolon or a space:
*;*
* *
Can I use an another separator? One of these, which is illegal in the file name:
<>:"/\|*?
I think will be good colon : or pipe |.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

"|" is widely used as exluding mask.
":" is valid character, because you specifying full name with letter.
Mask with spaces must be qouted by quotes. So mask separators if they used as part of mask must be quoted.
By the way, it is only ntfs and fat does not allows colons in names, but not some other FSs(ext2/3/4, other from UNIX world).

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre
":" is valid character, because you specifying full name with letter.
No, the mask only applies to the file name, without path. The path is specified in field "Directory".
Mask with spaces must be qouted by quotes. So mask separators if they used as part of mask must be quoted.
No, in the current version of the script do not use quotes for search files with spaces in the name, so we should give:
* *

What separator will be the best?
For now, I don't know how to solve this problem.
Maybe leave it as is, and to advanced search use regular expressions.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

No, the mask only applies to the file name, without path. The path is specified in field "Directory".
Probably. I did used it once, so not remembered details.
No, in the current version of the script do not use quotes for search files with spaces in the name, so we should give:
* *
I know. I meant, it would be good if it will in future.
What separator will be the best?
For now, I don't know how to solve this problem.
Maybe leave it as is, and to advanced search use regular expressions.
Do it by your desire, I shall be happy in any case. By the way, ampersand (&) sign can also be suitable here.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre
With an ampersand is the same problem as with a semicolon - it may be in the file name.
Can apply slash or backslash as separator?

DV
Offline
Posts: 1250
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Post by DV »

Semicolon ';' and comma ',' are commonly used as separators in different file managers. Also, spaces are ignored in this case, i.e. "*.cmd;*.bat" equals to "*.cmd, *.bat". This is a common and usual way, so seems to be the best option. If you want to support ',' and ';' as a part of file name, consider use them inside quotes. Otherwise just treat them as separators.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre, DV
Ok, I'll try to do it with a semicolon as a separator.

Andrey_A_A
Thank you for the translation into Russian FindFiles.js.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FindFiles.js
Added: Alt+Del - remove item from history list (Directory, Name of file, Text in file).
Added: Russian translation.
Fixed: set selection after changing setting "Show full path on files list".

Note:
Starting from version 4.8.0 AkelPad, properly working search in binary files.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre wrote:KDJ, can You add multiple wildcards search? Separated by semicolon like "*.h*; *.c*".
Try this test version FindFiles_test.js: http://akelpad.sourceforge.net/files/pl ... ts/KDJ.zip

PS: Help for wildcards - F1 or button "?".

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

Yes, it works for me now :) Thanks.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FindFiles.js
Added:
- in the field "Name of file", you can specify a semicolon-separated list of wildcards masks,
- help for wildcards.
Updated Chinese translation.

Offline
Posts: 3217
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

KDJ
> FindFiles.js
I would like when you open the file (double-click), the first occurrence of the searched text has been selected.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FindFiles.js
Added: ability to translate RegExp help.
Updated Chinese translation.
VladSh wrote:> FindFiles.js
I would like when you open the file (double-click), the first occurrence of the searched text has been selected.
I'll take this into account in the next version of script.
Locked