Actually, the shell could help a bit. At least one thing that it could do would be to ignore files starting with a dash when expanding '*', the same way it ignores files starting with a dot. I don't know if that would be POSIX compliant, but there are more bad reasons than good for that sort of expansion. Recognising ASCII-zero as a separator for file names in a text stream might also be useful, although I have no idea what other implications that would have, and it would probably fail under many circumstances.
Posted Mar 29, 2009 0:01 UTC (Sun) by mikachu (guest, #5333)
[Link]
On days when I'm feeling paranoid I always say ./* instead of just *, especially when talking to /bin/rm. On the other hand, touch -- -i in directories where you have important files is a nice trick too.