bleachbit / wishlist

Wishlist enhancements related to BleachBit
GNU General Public License v3.0
7 stars 1 forks source link

Re-do the search-attribute (at least for command="delete") and remove search="glob" #33

Closed Tobias-B-Besemer closed 5 years ago

Tobias-B-Besemer commented 5 years ago

Andrew,

I think you should re-do the search-attribute (at least for command="delete") and remove (or declare as depreciated) search="glob". I working now since weeks on cleaners, think with my 30+ years knowledge I'm a good IT Professional, but I still don't get the glob-thing! Therefor I'm pretty sure most others interested in writing cleaners will also not get it! You just can't expect that the people understand Python (or read the documentation) and know about Unix-Commands/-Connections! Also: It seems that (at least in your implementation) are to many special cases... (See e.g.: https://github.com/bleachbit/bleachbit/issues/447) ...and I also think that no one will easily get it that you e.g. have to use search="file", to remove an (empty?) folder... ...I know you said you will bring search="folder", but I think search="glob" should be removed anyway! BleachBit should internal, depending on "path=" know when search="glob" is necessary and when not!

To remove search="glob" I see two possible options:

command="delete" search="[...]"-cases I would understand/can imagine are (so far):

At least two wild-cards should work in every search=[...]!

E.g. search="folder" should work in all those writing versions:

Please let me know if I have something missed!

Greets, Tobias.

Tobias-B-Besemer commented 5 years ago

Seems you switched already one day to "Version 2.0"... https://github.com/bleachbit/bleachbit/commit/ac6a20a3f779ce4fa92fc100bc6553a4daf4e734

az0 commented 5 years ago

Linux allows a filename to be be a ? or * symbol, so autodetect is not reliable.

You wrote

and I also think that no one will easily get it that you e.g. have to use search="file", to remove an (empty?) folder...

Originally there was no plan to support deleting an empty folder (except when deleting them recursively---but not deleting the parent), and search="file" was originally intended to delete a literal filename. It's more as a quirk that it happens to delete folders too.

You wrote

At least two wild-cards should work in every search=[...]!

With search="glob" you can have two, or ten, or even more wildcards.

Tobias-B-Besemer commented 5 years ago

Linux allows a filename to be be a ? or * symbol, so autodetect is not reliable.

OK.

You wrote

and I also think that no one will easily get it that you e.g. have to use search="file", to remove an (empty?) folder...

Originally there was no plan to support deleting an empty folder (except when deleting them recursively---but not deleting the parent), and search="file" was originally intended to delete a literal filename. It's more as a quirk that it happens to delete folders too.

I was just thinking I need "glob" for it - this was the reason why I used it...

You wrote

At least two wild-cards should work in every search=[...]!

With search="glob" you can have two, or ten, or even more wildcards.

OK, but why is then the FF62 Storage Cleaner not working? Glob doesn't go recursive, right?

How should "search=folder" in future work?

az0 commented 5 years ago

I added a new search="walk.top" which deletes all files and directories under the path plus the top directory itself. It is equivalent to search=walk.all followed by search=file

Tobias-B-Besemer commented 5 years ago

Already implemented ??? :-)

I add this to the docu...

But I think it's better to not change the cleaners by now, 'cause I have suggested a cleaner package for WinXP users with BBv2.2 and they won't have it... So last cleaner package for XP with BBv3.0 (?) and then use it and drop support for WinXP users completely ???

Tobias-B-Besemer commented 5 years ago

Added! ^^