On 20/06/06, Omer Zak <[EMAIL PROTECTED]> wrote:
On Mon, 2006-06-19 at 23:57 +0300, Nadav Har'El wrote:
> On Mon, Jun 19, 2006, Baruch Even wrote about "Re: Subversion-friendly Shell 
hacking?":
> > What you can do is create a shell function called mv that will check if
> > the file is in a subversion directory and do svn move on it. The
> > function will override the call to mv and you'll need to call the real
> > mv with /bin/mv.
>
> Another possible trick is to change "cd" itself to a function (or, in zsh,
> create a new "chpwd"), and after each directory change, re-alias the "cp"
> and "mv" commands.

I like this idea.  The 'cp' and 'mv' commands would retain their
efficiency.

I don't like the idea - it assumes that you always touch only files in
your current directory. Baruch's suggestion sounds much more general
to me. Efficiency differences are negligible here.

BTW - regardless of the aliasing mechanism you adopt - how are you
going to handle files which are copied/moved between an SVN directory
and a non-SVN one?

--Amos
--
"(a grizzly) can tear through a tree like a Jewish mother
through self-esteem."              - The Simpsons

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to