Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cvsvimdiff zshism
- X-seq: zsh-users 11260
- From: Philippe Troin <phil@xxxxxxxx>
- To: Chris Johnson <cjohnson@xxxxxxxxxx>
- Subject: Re: cvsvimdiff zshism
- Date: 09 Mar 2007 08:39:27 -0800
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20070309161209.GA30333@xxxxxxxxxxxxxxxxxx>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070309161209.GA30333@xxxxxxxxxxxxxxxxxx>
- Sender: phil@xxxxxxxx
Chris Johnson <cjohnson@xxxxxxxxxx> writes:
> I've just started using cvs to manage some code, and sometimes I want to
> compare my working copy of a file to some version in the repository.
> cvs diff offers a facility to do this, but I really prefer vim's diff
> capabilities. With vim, you can do side by side comparison of files,
> changes are highlighted, and so on.
>
> So, in order to make cvs diff work with vimdiff, I wrote the following
> function that exploits zsh's tmp file substitution mechanism. It's not
> very robust, 'cuz I don't know all the ways to break it yet. But here's
> a start:
Why not simply:
cvsvimdiff() {
if [[ $# -ne 2 ]] then
print Usage: $0 old_version file >& 2
return 1
fi
vimdiff $2 =(cvs -Q up -r $1 -p $2)
}
Patching is unnecessary when you can extract the old version
directly...
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author