From owner-freebsd-current@FreeBSD.ORG Tue Sep 25 18:57:36 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D47B516A41A; Tue, 25 Sep 2007 18:57:36 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id 55BC913C44B; Tue, 25 Sep 2007 18:57:36 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by koef.zs64.net (8.14.1/8.14.1) with ESMTP id l8PIWmcq038699; Tue, 25 Sep 2007 20:32:48 +0200 (CEST) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.1/8.14.1/Submit) id l8PIWmE9038698; Tue, 25 Sep 2007 14:32:48 -0400 (EDT) (envelope-from cracauer) Date: Tue, 25 Sep 2007 14:32:48 -0400 From: Martin Cracauer To: Daichi GOTO Message-ID: <20070925183248.GA38571@cons.org> References: <46F905FD.9060208@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46F905FD.9060208@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Current , Masanori OZAWA Subject: Re: The safety expansion for FreeBSD rm(1) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 18:57:36 -0000 My idea of a safety feature for rm(1): To solve the problem of doing rm foo * instead of rm foo* Look at what the commandline arguments are. If at least - one is appearing twice - or at least one is not appearing at all , then do a "*" expand like from a shell (not perfect of course not easy enough) and see whether all elements of "*" are there *plus* others with no "/". If so, the above situation occured and you only go ahead with a special flag. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/