Closed cynferdd closed 5 years ago
This is great! I'm happy to see contributions toward Rashell.
Just one thing!
Can we rename the command from del to rm instead? The objective is to bring a sort of Linux feel to Windows.
I did the required modifications.
Another thing I've noticed is that arguments are not being processed within the main
method. This is problematic in the case or rm
. For instance, rm --help
should have returned "Invalid argument" instead of "Deleting --help".
Taking care of arguments before parsing them to the operating method prevents that kind of error.
Thanks again.
Thanks a lot for the feedback, I'll try to keep that in mind for the next iterations :) . So if the need is to get a more "linux" feel, should I change the arguments from /P to -P (for example) ? Or maybe allow both ways ?
Let's allow both ways. If you'd have a look at for code for "ls" you'll see how this is being taken care of.
Sorry for my unconventional coding methods in advance. Looking forward to your future PRs. :)
Adding the del command to delete a file or many files. Works with wildcards. a bit of cleaning and simplification was done on some methods. TODO : the following parameters are not yet implemented : /F => Force deleting of read - only files. /S => Delete specified files from all subdirectories. /A => Selects files to delete based on attributes