From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17191 invoked from network); 13 Aug 2007 14:35:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=unavailable version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Aug 2007 14:35:21 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 15791 invoked from network); 13 Aug 2007 14:35:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Aug 2007 14:35:14 -0000 Received: (qmail 3740 invoked by alias); 13 Aug 2007 14:34:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23753 Received: (qmail 3721 invoked from network); 13 Aug 2007 14:34:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Aug 2007 14:34:58 -0000 Received: (qmail 13502 invoked from network); 13 Aug 2007 14:34:58 -0000 Received: from vinc17.pck.nerim.net (HELO prunille.vinc17.org) (213.41.242.187) by a.mx.sunsite.dk with SMTP; 13 Aug 2007 14:34:53 -0000 Received: by prunille.vinc17.org (Postfix, from userid 501) id C61C017FE5AD; Mon, 13 Aug 2007 16:34:52 +0200 (CEST) Date: Mon, 13 Aug 2007 16:34:52 +0200 From: Vincent Lefevre To: zsh-workers@sunsite.dk, zsh-users@sunsite.dk Subject: Re: the mv trap Message-ID: <20070813143452.GE6199@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk, zsh-users@sunsite.dk References: <20070813023540.GC6199@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.16-vl-r18536 (2007-08-08) On 2007-08-13 07:44:39 +0000, zzapper wrote: > red face; in fact my mv does report "not a directory". > My problem is reduced to unintentionally moving a single file to another > single file rather than the intended directory. > > MM solves this by suggesting a trailing slash > > $ mv x3 bucket/ > mv: accessing `bucket/': Not a directory If you fear to forget the trailing slash, you can also write a shell script/function that checks that the target is a directory, then executes mv. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)