Make "rename" command an alias for "mv"?

John Arbash Meinel john at arbash-meinel.com
Tue Oct 25 00:26:09 BST 2005


Martin Pool wrote:
> On 24/10/05, Matthieu Moy <Matthieu.Moy at imag.fr> wrote:
> 
> 
>>People used to unix's "mv" command like to have a single command for
>>this, but for other people, "move" a file and "rename" a file are two
>>distinct operations (see how you rename a file and how you move it to
>>a distinct directory in a graphical file manager for example - and
>>remember that bzr is supposed to be usable on Windows and therefore
>>by windows users).
> 
> 
> Perhaps as John says it will be enough to just have move and rename as
> aliases.  If we make sure that 'bzr mv foo bar/' fails with the
> trailing slash unless bar is a directory then it can satisfy everyone.
>  It seems that splitting them annoys more people than it pleases?

Well, as long as there is a reason for having the different commands,
and there is mv, I don't really care.

I could see it this way:

	bzr rename A B
		B must be the final name of A, it must not already exist
	bzr move A B
		B must be a directory which already exists
	bzr mv A B
		B can either be a directory or a non-existent filename

That way people who want the integrated functionality (like myself) have
it, and people who want one or the other also have it.

For "bzr move" we could alternatively support having "B" be a path which
does not exist, but we would check that the final name matches the
original name.

I think as long as it is clear, and the documentation represents it
well, there shouldn't be a problem.

John
=:->


> 
> 
>>I've teached the basis of unix to people in 1st year of engineering
>>school, and most students had difficulties to understand the unix "mv"
>>unification.
> 
> 
> Yes, I've seen that too, which was why I wanted them to be different
> -- that and annoyance with mv moving when I wanted rename to fail
> because the destination name given was an existing directory.
> 
> 
>>Martin considered this "mv" was mostly nocive [harmful] and did a
>>separate "move" and "rename". I'm glad that the unixish version is
>>also available.
> 
> 
> --
> Martin
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051024/29233afb/attachment-0001.pgp 


More information about the bazaar mailing list