From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Dangerous shell commands? (was: CUA mode's C-RET binding) Date: Wed, 12 Mar 2008 21:21:51 +0100 Message-ID: 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> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205353370 29746 80.91.229.12 (12 Mar 2008 20:22:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2008 20:22:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 12 21:23:08 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 1JZXTa-000108-AD for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2008 21:23:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZXT1-0000Gg-Hl for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2008 16:22:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZXSx-0000GR-Uk for emacs-devel@gnu.org; Wed, 12 Mar 2008 16:22:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZXSv-0000GF-Fl for emacs-devel@gnu.org; Wed, 12 Mar 2008 16:22:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZXSv-0000GC-As for emacs-devel@gnu.org; Wed, 12 Mar 2008 16:22:21 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZXSv-0004SN-AA for emacs-devel@gnu.org; Wed, 12 Mar 2008 16:22:21 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m2CKMH1v011837 for ; Wed, 12 Mar 2008 21:22:17 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 578C51C60E for ; Wed, 12 Mar 2008 21:22:17 +0100 (CET) X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.; yo.b yq4$p; ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <87fxuvdf3j.fsf@anzu.internal.golden-gryphon.com> (Manoj Srivastava's message of "Wed, 12 Mar 2008 12:30:56 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-DCC-dcc-servers.net-Metrics: poseidon 102; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:92314 Archived-At: 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'. I also have `unalias cp mv rm ln 2>/dev/null' in my shell init files to undo stupid alias like alias cp='cp -i'; alias mv='mv -i'; alias rm='rm -i'. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/