Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: the mv trap
- X-seq: zsh-workers 23753
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx, zsh-users@xxxxxxxxxx
- Subject: Re: the mv trap
- Date: Mon, 13 Aug 2007 16:34:52 +0200
- In-reply-to: <Xns998B58B931C45zzappergmailcom@xxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Xns998ADF1A94C0Dzzappergmailcom@xxxxxxxxxxx> <20070813023540.GC6199@xxxxxxxxxxxxxxxxxxx> <Xns998B58B931C45zzappergmailcom@xxxxxxxxxxx>
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 <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author