Bug 430059 - Subversion path completion produces whitespaces
Subversion path completion produces whitespaces
Product: Fedora
Classification: Fedora
Component: bash-completion (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-24 05:16 EST by Tim Niemueller
Modified: 2008-02-13 00:09 EST (History)
1 user (show)

See Also:
Fixed In Version: 20060301-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-13 00:09:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Niemueller 2008-01-24 05:16:33 EST
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):

How reproducible:

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 13:10:24 EST
Could you try replacing line 9088 in /etc/bash_completion:

    complete -F _svn $default svn


    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 13:20:50 EST
Ville, that change is working well for me; I haven't noticed any side effects so
Comment 3 Tim Niemueller 2008-01-24 16:58:39 EST
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 15:16:31 EST
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 15:22:25 EST
Ok. Are you going to integrate that fix in the package?
Comment 6 Fedora Update System 2008-01-26 04:16:36 EST
bash-completion-20060301-9 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-01-27 02:26:33 EST
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 00:09:11 EST
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.