Completion of cp command adds space instead of slash to directories

Bug #1087996 reported by Hegh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

When using tab-completion for the cp command, when completing directories, the completion inserts a space instead of a slash after the name. This causes much backspacing and retyping.

Expected behavior:
cp ~/src/pr<TAB>
cp ~/src/projects/j<TAB> ==> ~/src/projects/java/
cp ~/src/projects/java/pom<TAB> ==>~/src/projects/java/pom.xml<SPACE>
cp ~/src/projects/java/pom.xml ~/tmp/

Actual behavior:
cp ~/src/pr<TAB> ==> ~/src/projects<SPACE>
cp ~/src/projects <BACKSPACE>
cp ~/src/projects/j<TAB> ==> ~/src/projects/java<SPACE>
cp ~/src/projects/java <BACKSPACE>
cp ~/src/projects/java/pom<TAB> ==> ~/src/projects/java/pom.xml<SPACE>
cp ~/src/projects/java/pom.xml ~/tmp/

This works as expected on Ubuntu 12.04 Server, and I'm pretty sure it used to work on Kubuntu 12.04 (what I am running) until relatively recently, maybe just a couple of weeks ago.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bash-completion 1:1.3-1ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-34.53-generic 3.2.33
Uname: Linux 3.2.0-34-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Sat Dec 8 10:05:28 2012
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120424)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Hegh (celloman) wrote :
Changed in bash-completion (Ubuntu):
assignee: nobody → Girish Sanenahalli (girish-cs7036)
Changed in bash-completion (Ubuntu):
importance: Undecided → Low
assignee: Girish Sanenahalli (girish-cs7036) → nobody
Revision history for this message
Peter Cordes (peter-cordes) wrote :

I've never seen this, and it doesn't currently happen on Ubuntu 14.04. If you can still reproduce this, give us a testcase.
e.g.
 mkdir -p foo/bar
 touch foo/bar/baz
 cp foo/b<tab>

or something.

 But probably you have something bad in your ~/.bash_completion, or /etc/bash_completion.d, or something, that's breaking programmable completion for other stuff.

Changed in bash-completion (Ubuntu):
status: New → Incomplete
Revision history for this message
Peter Cordes (peter-cordes) wrote :

If this wasn't /etc/bash_completion.d/acroread.sh (which is now blacklisted), then add info to bug 1372286. If we can file more problematic files to blacklist, we can prevent this problem for other people.

 Closing this because it was reported against a version before the acroread blacklist was added.

Changed in bash-completion (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.