Open jsbain opened 10 years ago
jsbain, good catch. the rm used is from the original shelista. How about rm will only remove a single file. To remove everything from a directory and/or subdirectories -r flag will be required.
@jsbain I forgot to reload the module after making changes which resulted in deleting my Documents folder.
Lol, oh no!
Should be fixed if you re download shellista-core
Added argparse and -r -v -f flags to core rm_plugin.py. The default of rm will remove a single file and ask for confirmation. The -r flag will recursively remove directories. The -f flag will ignore confirmation. -v will show output in console.
Could someone please test this?
Fat fingered an extra period today in my Documents folder...
rm. somefile
I noticed the extra period, noticed it was taking a while, so cancelled the script. At that point, about half of the folders, etc under my main directory had been removed!I'm thinking rm ., rm .., or for that matter deleting any folder on the current fully expanded path should be disallowed.
I think in real bash, you'd have to do rm -r to recursively delete. We may want to modify rm this way to be a little safer...