The current version of bash-completion (20041017-r3) is not very practical for the command "cvs commit". When I am in the root directory of a project, and I would like to commit the file documentation/myproject.html, I would like to type "cvs ci doc<TAB>my<TAB>" and have it completed to "cvs ci documentation/myproject.html". However, after the first TAB, I get "cvs ci documentation " (note the trailing space) so that I have to go back, add the slash, and continue completion. This behaviour is pretty annoying. Strangely enough, completion works correctly for "cvs diff". Reproducible: Always Steps to Reproduce: 1. Go into the root of a project managed with cvs and having files in subdirectories. 2. Try to auto-complete a "cvs commit" for a file in a subdirectory. Actual Results: The name of the directory is added to the command line, with a trailing space. Expected Results: The name of the directory, with a trailing slash and *no* space, should have been added to the command line.
Created attachment 48795 [details, diff] A possible fix to /etc/bash_completion This patch to /etc/bash_completion seems to fix the behaviour of "cvs commit". However, I'm not yet sure if it breaks someting else for cvs auto-completion. I'll report back after a few days of use.
Please try the latest version (I've just committed 20050112-r1). It has much improved cvs commit completion code.
I'm afraid the symptoms with "cvs commit" are still exactly the same (using app-shells/bash-completion-20050112-r1). The patch still seems to work, too.
Ok, this is what I am going to do for the solution. Since your "actual results" and "expected results" are both valid CVS commands, I really don't want to choose one or the other. Instead, I will be fixing it so that no space is appended to the directory name. This way, if you wanted to commit the dir as a whole (cvs ci dir) you can just hit enter. If you want to commit something *in* dir, then you can manually append the '/' and finish completing. 20050120 was just released today, so my fix will be included in the version bump.
Bah, scratch that as I found a better solution ;) 20050120 is in cvs. Thanks for the report.