[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "rm" bug
From: |
James Youngman |
Subject: |
Re: "rm" bug |
Date: |
Mon, 29 Aug 2005 23:40:07 +0100 |
User-agent: |
Mutt/1.5.9i |
On Mon, Aug 29, 2005 at 02:17:10PM -0700, Paul Eggert wrote:
> The latter, but this comes up so often (I must have seen this reported
> a hundred times...) that I thought I'd try to improve the diagnostic.
> I installed this:
>
> 2005-08-29 Paul Eggert <address@hidden>
>
> * NEWS: "rm -FOO" now suggests "rm ./-FOO" if the file "-FOO"
> exists and "-FOO" is not a valid option.
> * src/rm.c: Include lstat.h, quotearg.h.
> (diagnose_leading_hyphen): New function.
> (main): Use it.
Good plan. While I think about it, it might also be worth enhancing
the --help output to point out that "rm ./*" is safe while "rm *"
might do things you did not expect (think "touch ./-rf").
I attach a patch (with ChangeLog entry) which includes such a change
to the help message. I have snail-mailed a completed copyright
assignment for coreutils, but it hasn't turned up in copyright.list
yet (in any case this particular change is tiny).
Regards,
James.
rm-help-dotstar-suggestion.patch
Description: Text document