Bug 430059 - Subversion path completion produces whitespaces
Summary: Subversion path completion produces whitespaces
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-24 10:16 UTC by Tim Niemueller
Modified: 2008-02-13 05:09 UTC (History)
1 user (show)

Fixed In Version: 20060301-9
Clone Of:
Environment:
Last Closed: 2008-02-13 05:09:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Niemueller 2008-01-24 10:16:33 UTC
Description of problem:
Assume you are inside a Subversion working copy. There is a path src/foo/bar.c.
There are other files as well in the foo directory, but you only want to commit
bar.c. You would type "svn ci src/foo/bar.c". Using the auto-completion, it will be

svn ci s<tab> which is then extended to "svn ci src ", note the space at the
end? For each path element you then have to do <Backspace> and type a slash and
then tab on. What the auto-completion should rather do is work like the
completion for ls. After the first expansion it should show "svn ci src/".

Version-Release number of selected component (if applicable):
bash-completion-20060301-6.fc8

How reproducible:
Always

Steps to Reproduce:
1. Checkout something via svn
2. Try auto-completion to a path with a "svn ci" prepended
  
Actual results:
It completes every directory on the path to the dir name followed by a space.

Expected results:
Work like ls auto-completion, completing paths to dir/.

Additional info:
This behaviour actually slows one down instead of going faster.

Comment 1 Ville Skyttä 2008-01-24 18:10:24 UTC
Could you try replacing line 9088 in /etc/bash_completion:

    complete -F _svn $default svn

...with:

    complete -F _svn $filenames svn

...and let me know how it works for you?  I think this is the right thing to do,
but I'm not entirely sure if it has any side effects.  Note that a new shell is
required for the change to take effect.


Comment 2 Jeff Sheltren 2008-01-24 18:20:50 UTC
Ville, that change is working well for me; I haven't noticed any side effects so
far...

Comment 3 Tim Niemueller 2008-01-24 21:58:39 UTC
Works great for me! Thank you so much.

BTW, is there a specific reason why the svn parts are not factored out to
something like /etc/bash_completion.d/svn?

Comment 4 Ville Skyttä 2008-01-25 20:16:31 UTC
No particular reason except that upstream does it that way; I suppose their
judgement is that svn is commonly available enough to be kept in the main
bash_completion file.

By the way, I have a nagging feeling that I've seen this same problem in some
use cases with cvs as well as with svn, but I can't seem to be able to trigger
it now.  Anyone else remember seeing that?

Off topic: Jeff, I'm considering dropping the disttag from the bash-completion
package; there's nothing distro version specific in it and nothing that would
really benefit from a disttag (rebuilds between distro releases).  Objections?

Comment 5 Tim Niemueller 2008-01-25 20:22:25 UTC
Ok. Are you going to integrate that fix in the package?

Comment 6 Fedora Update System 2008-01-26 09:16:36 UTC
bash-completion-20060301-9 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-01-27 07:26:33 UTC
bash-completion-20060301-9 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bash-completion'.  You can provide feedback for this update here: http://admin.fedoraproject.org/F8/FEDORA-2008-1104

Comment 8 Fedora Update System 2008-02-13 05:09:11 UTC
bash-completion-20060301-9 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.