Active
Project:
Drush Cleanup
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2010 at 10:53 UTC
Updated:
4 Mar 2011 at 21:56 UTC
Hi great add-on. I was wondering if you could add some paramets to it, so if I put file name or folder this will be also removed. E.g.:
$ drush cu test test.txt dummy.xxx
..this should cleanup all standards files and this extra 3 (files/directories) as well. What do you think?
Comments
Comment #1
Chris CharltonI like the idea. In your example would every instance of "test.txt" be deleted anywhere its found (including sub-directories)?
Your idea of removing a folder by name seems a bit scary since it can cause more damage than good. I'm not saying its not a good idea as an enhancement to this Drush plug-in and maybe we just need to define a flag/syntax that would force people to deliberately delete entire folders by name.
One thought that just came to mind is the fact that some files would have no file extensions so "test" could mean a directory, a file, or both. Need to think this one out a little more but its where this plug-in is headed, that's for sure.
Thoughts?
Comment #2
Chris CharltonComment #3
TheDoctor commented@Chris:
Great idea; flags/switches should be enforced IMO. Perhaps a "sudo"-like function or simply use "-n" or -"y" accordingly (preferred as other Drush aspects use this methodology).
... or maybe a "mv" to ~/drupal_trashcan instead of deletion?
Comment #5
sobi3ch commentedNo, I rather think about this similar to the linux shell. U could add switches like -R (recursive) for sub-directories.
most of the files (mayby all) have extensions like .module .install etc. To prevent directory from accidental removing plug-in can ask user if he/she are sure they want to remove entire folder . With file without extension it can do the same.
Comment #6
sobi3ch commentedComment #7
Chris CharltonI have designed the new version of this plug-in to read an external text file (*.cleanup.ini) and delete the files listed in those files. I have planned for people to supply an option "--file=customfile.cleanup.ini" for custom needs like this.