From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Manoj Srivastava Newsgroups: gmane.emacs.devel Subject: Re: Dangerous shell commands? Date: Wed, 12 Mar 2008 19:14:50 -0500 Organization: Manoj Srivastava's Home Message-ID: <877ig7cwed.fsf@anzu.internal.golden-gryphon.com> References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87pru8enjx.fsf@kfs-lx.rd.rdm> <871w6l3u8f.fsf@kfs-lx.rd.rdm> <871w6j7cga.fsf@kfs-lx.rd.rdm> <003001c8823a$d7cd5010$0600a8c0@us.oracle.com> <87lk4r5v2o.fsf@kfs-lx.rd.rdm> <003101c88242$18736fd0$0600a8c0@us.oracle.com> <7dbe73ed0803100313g46d079dag91e1b8af1f750ee8@mail.gmail.com> <47D53BF1.70401@gmail.com> <47D54B62.9010404@gmail.com> <87k5kai2y8.fsf@jurta.org> <87wso9c7dn.fsf@anzu.internal.golden-gryphon.com> <87fxuvdf3j.fsf@anzu.internal.golden-gryphon.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205367351 11657 80.91.229.12 (13 Mar 2008 00:15:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2008 00:15:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 13 01:16:19 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZb7K-0006qD-JV for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 01:16:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZb6l-0005iJ-PN for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2008 20:15:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZb6B-0005Kw-KX for emacs-devel@gnu.org; Wed, 12 Mar 2008 20:15:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZb69-0005IY-DT for emacs-devel@gnu.org; Wed, 12 Mar 2008 20:15:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZb69-0005IL-67 for emacs-devel@gnu.org; Wed, 12 Mar 2008 20:15:05 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZb68-00037h-IZ for emacs-devel@gnu.org; Wed, 12 Mar 2008 20:15:05 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JZb63-0006uE-72 for emacs-devel@gnu.org; Thu, 13 Mar 2008 00:14:59 +0000 Original-Received: from tiamat.golden-gryphon.com ([204.117.95.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Mar 2008 00:14:59 +0000 Original-Received: from srivasta by tiamat.golden-gryphon.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Mar 2008 00:14:59 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: tiamat.golden-gryphon.com User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) (x86_64-unknown-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAACYAAAAwCAMAAABKbPgaAAAAM1BMVEUAAADIjH/0rp1KPz79 0b+ic2nlpJc2Ly2AY17VlYb4uqi2gHQXFBN2WVXgno5iT02Xa2Nx+jaIAAACVElEQVQ4jeWU23bj I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j~`Wq Xl,y1a!(>6`UM{~'X[Y_,Bv+}=L\SS*mA8=s;!=O`ja|@PEzb&i0}Qp,`Z\:6:OmRi* Cancel-Lock: sha1:tspKjOd64dNazzm2iQWpHl9aiY4= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92342 Archived-At: On Wed, 12 Mar 2008 21:21:51 +0100, Reiner Steib said: > On Wed, Mar 12 2008, Manoj Srivastava wrote: >> On Wed, 12 Mar 2008 11:12:05 -0400, Richard Stallman >> said: >> >>> A more plausible scenario is if I have recently run "rm -rf .", in a >>> directory where that was appropriate. Now I have cd'd to a >>> different directory (perhaps even my home directory), where >>> executing that command could do damage. >> >>> Yes, it could. But what can we do about that rare case without >>> causing lots and lots of hassles in more common cases? >> >> The shell that I occassionally use, zsh, has an optional mechanism >> that intercepts "rm -rf *", and asks a y-or-n-p kind of question, >> *but* (and this is critical) -- adds a 10 second window where >> keystrokes are ignored. I like that feature, it makes me take a time >> out, think about what I am doing, and prevents my fingers from >> learning "rm -rf *y" as the sequence to use. > If I type `rm -rf', I actually *want* "never prompt". If I'd like to > have "prompt before every removal", I use `-i'. Actually, I like zsh presenting me a middle path, not the black or white options you present here. If I want a prompt on every rm invocation, I use rm -i. I also do not want prompts when I say rm -rf A* I do like having a prompt when I say "rm -rf *" ; since that is fraught with possibility of danger. So, this is not always prompt, nor is it never prompt, it is "optionally" sometimes prompt for the most risky uses of rm -rf. I like the nuanced prompting option. manoj -- IBM Advanced Systems Group -- a bunch of mindless jerks, who'll be first against the wall when the revolution comes... -- with regrets to D. Adams Manoj Srivastava 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C