Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: cvs-like file completion



Frank Terbeck wrote:
> Chris Johnson <cjohnson@xxxxxxxxxx>:
> > That is, I want to complete for a script cvsvimdiff all files that need
> > committing to the cvs repository.  Something like:
> > 
> >    compdef cvsvimdiff="cvs add"
> > 
> 
> If the cvs completion function file _cvs is already loaded (and not
> only marked for autoloading by compinit), you could do:

  autoload +X _cvs

will load the _cvs completion.

  _cvs_only_add() {
    autoload +X _cvs
    _cvs_files_unmaintained "$@"
  }
  compdef _cvs_only_add cvsvimdiff

would do the trick, E&OE.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



Messages sorted by: Reverse Date, Date, Thread, Author