Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Using CVS Completion Functions
- X-seq: zsh-users 11691
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Using CVS Completion Functions
- Date: Tue, 31 Jul 2007 09:21:11 -0400
- In-reply-to: <200707251610.l6PGAjhH024852@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070725135652.GA3921@xxxxxxxxxxxxxxxxxx> <200707251610.l6PGAjhH024852@xxxxxxxxxxxxxx>
Peter Stephenson sent me the following 1.9K:
> > Hi. A few weeks ago I posted about trying to get a subset of cvs
> > completion for a script of mine. This was the solution I came up with,
> > based on Peter's suggestion:
> >
> > _cvs_changed_files() {
> > autoload +X _cvs
> > _cvs_files_modified "$@" || _cvs_files "$@"
> > }
> > compdef _cvs_changed_files cvsvimdiff
>
> _cvs_files_modfied and _cvs_files are within the _cvs function, so you
> have to load *and run* _cvs to acquire them, which I missed before. This
> version of _cvs redefines _cvs to the real completion function when it
> runs. Unfortunately, running it has the obvious effect of calling
> normal _cvs completion. There is a truly horrible hack...
Thanks, Peter. I think knowing that I need to invoke the _cvs
completion function before trying to complete cvsvimdiff is an
acceptable limitation. I usually run "cvs -n update" first anyway, to
see what's changed.
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author