Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rfc patch, abort rm instead of only removing the * from the cmdline



2008/8/16 Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>:
> On Sat, Aug 16, 2008 at 06:02:13PM +0200, Mikael Magnusson wrote:
> [...]
>> Maybe it was unclear from the context I gave, but I'm talking about this prompt:
>> % rm *
>> zsh: sure you want to delete all the files in /tmp/a [yn]?
>>
>> Answering no to this prompt, I would expect the command to not be run,
>> but it is, with the * removed.
> [...]
>
> With what version of zsh? I can't reproduce it here with the
> current one.
>
> % rm *
> zsh: sure you want to delete all the files in /tmp/a [yn]? n
> % rm
> rm: missing operand
> Try `rm --help' for more information.
> %
>
> Am I missing something?

It looks like it does abort the command if the * is the _only_ argument...
I couldn't check easily as I already have the patch applied :).

% rm * --help
zsh: sure you want to delete all the files in /home/mikachu/a [yn]? n
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).
.
.
.

-- 
Mikael Magnusson

Putting me in reply-to makes my client put me in the to: field when i
hit reply-to-all, seems counterproductive...



Messages sorted by: Reverse Date, Date, Thread, Author