Find Function Confusion

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
xinu
Posts: 1
Joined: Mon Jul 19, 2021 7:02 am

Find Function Confusion

Post by xinu »

Hello,

First of all, thank you very much for my favourite Linux file explorer, Mr. PCMan & Co.

Only one thingie, my eye fell upon: the pcmanfm 'Search Files' window.
It could be confusing for newer users of the program.

It says 'your patterns here', with one asterix.

I didn't look under the hood, but I guess it makes use of the Linux 'find' command:

Code: Select all

find -name "*SEARCHTERM*"
(case sensitve) or

Code: Select all

find -iname "*SEARCHTERM*"
(case insensitive).

Users who see the single asterix in the pcmanfm search window might think that a single asterix counts as a wildcard, like this:

*SEARCHTERM or SEARCHTERM* or partially *TERM, SEARCH* etc.

with an empty resultscreen as a result.

To make the search work you have to do *SEARCHTERM*, within double asterix's.
It won't work without astrix's either.
A partial *SEARCH* e.g. will find all the filenames with that word within.

Wouldn't it be better to ask for a (partial) 'searchterm' altogether instead of a 'pattern' and build the double asterix's into the program,
so the user only inserts his (partial) search term?

I've included a snapshot of the concerned search/find window.
I'm sorry, in Dutch, my mother tongue.

pcmanfm search window
pcmanfm search window
pcmanfm_find.jpg (26.6 KiB) Viewed 5479 times
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Find Function Confusion

Post by drooly »

xinu wrote: Mon Jul 19, 2021 7:50 amI didn't look under the hood, but I guess it makes use of the Linux 'find' command:
I'm sorry but you guessed wrong. It does not depend on find/findutils at all.

I agree that pcmanfm's search dialog is not super easy, but what you propose would make it less powerful.

As it is, you can search for
  • an exact filename without asterisks: Twig.pdf
  • all files with a particular ending: *.pdf
  • all files that start with a string: Twi*
  • all files that contain a string: *wig*
As the tooltip for the entry says, these are just shell patterns. You can string them together with commas. With regular expressions (not newbie friendly at all) you can get even more powerful.

If you think this needs to be changed I suggest you fork the repository, implement your changes, and make a pull request.

Personally I think it is what it is, it works well enough for something that is built into one of the most lightweight GUI filemanagers.
Locked