Prevent rm dir/foo<ACCIDENTAL_SPACE>*
Bug #724111 reported by
François Marier
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Safe-rm |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Martyn Smith <email address hidden> suggests the following:
When parsing the arguments, take a glob '*' to list all of the files in the current
directory then compare this to the arguments to rm.
If all of the files in the current directory were specified AND there was at least
one other path in the arguments to rm then it's clear that the user mistyped
"rm -rf dir/foo*" as "rm-rf dir/foo *".
In that case, bail.
Changed in safe-rm: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
description: | updated |
To post a comment you must log in.