views:

327

answers:

3

How can I get tab completion to work for selecting CVS modules under Linux (preferably using bash) ?

For example, "cvs co " + tab would list the modules I can checkout. I've heard it's easy to do using zsh, but still I didn't manage to get it working either.

Also, how can I list all available modules (or repositories?) available in the CVSROOT?

+2  A: 

There is the Bash completion project. It has some cvs completion in it, I'm not 100% if it can determine all the modules for checkout. But it would be a good place to start.

Steve K
+2  A: 

I already have this behavior I think (don't have a reliable CVS repository to check against) in Ubuntu 8.04.

There's a lot of code in /etc/bash_completion to handle cvs completion, might wanna take a look at that.

And the command to list modules on a CVSRoot is cvs -d "$the_cvsroot" checkout -c

Isak Savo
A: 

Actually, as you guys said, Ubuntu has built in support for tab completion of CVS modules.

The one thing I was missing, I have to manually add a mapping of the module name and its alias in the CVSROOT/modules file for the supported completion to work.

skinp