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
- X-seq: zsh-users 13143
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- Subject: Re: rfc patch, abort rm instead of only removing the * from the cmdline
- Date: Sat, 16 Aug 2008 18:02:13 +0200
- Cc: zsh-users <zsh-users@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=xoueqRkg8vuC67zB6LEO9IxDNekfb74VBwVW/G5Hykk=; b=CbcdVAHPFq93n/NRjOQtDRbfM1c4EuxfmYY6J9RxYA9SpzjPNu7SOfuiDvVkNiglkx LkrMO0YwBHLPcIsWwTbARoTvbXUlWCx4su6GKEeFQoEF+wjnGt/88p26Z9q64neNFv3D M5ZQLd0m/ug9JdR6SWgMUXI/z8/sLlQs2JjwY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=bYqVz/zDSJF5c0pyk+eprgtLczGa2Tdy9RHsB/60CDP4cZpZwFR0Oo7k+UBgPLXxJm k15whSaSpfiZZ//4wKJmZJ+nLbaJ/sG73O7FshyYcJIDjjwOIkF9Jby2feLRc/Z+c2D2 QGACOe7z0bvU8clluCCuOWqjmcK0hzRx1E3Wc=
- In-reply-to: <2d460de70808160858p5312805dlf1c9976a9b702a51@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0808151649j1d14ce23s1acad02da98fdfdf@xxxxxxxxxxxxxx> <2d460de70808160858p5312805dlf1c9976a9b702a51@xxxxxxxxxxxxxx>
2008/8/16 Richard Hartmann <richih.mailinglist@xxxxxxxxx>:
> On Sat, Aug 16, 2008 at 01:49, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
>> % rm -rf * /tmp
>> Before, even if you said no to the prompt, it will remove all your
>> files in /tmp.
>
> I am not quite sure what typo you want to catch? Maybe
>
> rm -rf */tmp
>
> but I am not sure.
>
>
>> - uremnode(args, node);
>> + return;
>
> Silently aborting on a valid syntax is always bad. As long as you
> are in there, why not add a warning, informing the user of what
> you are doing? Also, all new code should have comments, imo :)
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.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author