Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78439 - bash-completion does not complete correctly for "cvs commit"
Summary: bash-completion does not complete correctly for "cvs commit"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-17 16:01 UTC by Remy Blank
Modified: 2005-01-20 03:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
A possible fix to /etc/bash_completion (bash-completion,249 bytes, patch)
2005-01-17 16:06 UTC, Remy Blank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Blank 2005-01-17 16:01:37 UTC
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.
Comment 1 Remy Blank 2005-01-17 16:06:19 UTC
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.
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-01-17 16:43:28 UTC
Please try the latest version (I've just committed 20050112-r1).  It has much improved cvs commit completion code.
Comment 3 Remy Blank 2005-01-18 00:51:23 UTC
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.
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2005-01-20 03:26:02 UTC
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.
Comment 5 Aaron Walker (RETIRED) gentoo-dev 2005-01-20 03:49:32 UTC
Bah, scratch that as I found a better solution ;)
20050120 is in cvs.  Thanks for the report.