New suggestion from Martyn
[safe-rm.git] / issues / i_7e30a60c.cil
blob4b38921a6019f2ac75fc84fba45c1431ea432ce9
1 Summary: Prevent rm dir/foo<ACCIDENTAL_SPACE>*
2 Status: New
3 CreatedBy: Martyn Smith <martyn@dollyfish.net.nz>
4 AssignedTo: Francois Marier <francois@safe-rm.org.nz>
5 Label: enhancement
6 Inserted: 2009-03-27T05:10:07
7 Updated: 2009-03-27T05:22:51
9 When parsing the arguments, take a glob '*' to list all of the files in the current
10 directory then compare this to the arguments to rm.
12 If all of the files in the current directory were specified AND there was at least
13 one other path in the arguments to rm then it's clear that the user mistyped
14 "rm -rf dir/foo*" as "rm-rf dir/foo *".
16 In that case, bail.