Ubuntu

terminal autocompletion adds space after "cp" target folder using Tab

Reported by Christof Buchbender on 2011-04-22
60
This bug affects 13 people
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gnome-terminal

When using "cp" or "mv" the tab auto-completion of the target folder adds a space after the autocompleted folder name. This makes the navigation to sub-folders cumbersome since one has to delete this additional space first. I found this change in behavior after upgrading from Maverick 10.10 to Natty 11.04 beta 2. An example is:

"cp someFile Doc[pressing Tab]" -> "cp someFile Documents[additional Space]"

Description: Ubuntu 11.04
Release: 11.04

gnome-terminal:
  Installed: 2.32.1-0ubuntu3
  Candidate: 2.32.1-0ubuntu3
  Version table:
 *** 2.32.1-0ubuntu3 0
        500 http://ubuntu.cica.es/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-terminal 2.32.1-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: wl fglrx
Architecture: amd64
Date: Fri Apr 22 11:06:00 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gnome-terminal
UpgradeStatus: Upgraded to natty on 2011-04-20 (1 days ago)

Christof Buchbender (ascurion) wrote :
Mark Fraser (launchpad-mfraz) wrote :

Also does it with other commands such as ls.

Mark Fraser (launchpad-mfraz) wrote :

I'm using Kubuntu 11.04 beta 2 and this affects me so it isn't gnome-terminal, I would say bash-completion.

Mark Fraser (launchpad-mfraz) wrote :

From reading https://alioth.debian.org/tracker/?group_id=100114&atid=413095&func=detail&aid=312903 it looks like it could be the fault of Adobe Acrobat, but why I don't have the same problem in 10.10 is odd.

Christof Buchbender (ascurion) wrote :

Yes, I find the same behavior using ls,rm,ln,mkdir. However, I just saw that for commands to open programs, e.g. acroread or gimp, the behavior is normal adding a \ after folders when giving a additional variable, i.e. a file to open, to the program in the command line using the tab completion. Strangely, also the command "more" does behave normal, while "less" does not.

Christof Buchbender (ascurion) wrote :

Following your comment that the problem could stem from Adobe Acrobat, I just removed the Acrobat Reader package from my system. You were right, now the bash-completion does behave normal. So the problems really seems to come from Adobe Acrobat.

Christof Buchbender (ascurion) wrote :

After the update of Adobe Acrobat today, the bash-completion is back to its normal behavior. So this bug is no issue anymore and was not due to gnome-terminal.

Changed in gnome-terminal (Ubuntu):
status: New → Fix Released
Todor Kouyoumdjiev (todor-k) wrote :

For me it worked after installing acroread-fonts from mediubuntu

dogmatic69 (dogmatic69) wrote :

I got this after installing wine.

It was very annoying so 'apt-get remove wine' and 'apt-get autoremove' and things are back to normal

Leo (mystixx22) wrote :

The problem [1], [2] is /etc/bash_completion.d/acroread.sh.
Just remove it and then execute . /etc/bash_completion.
Worked for me.

[1] http://stackoverflow.com/questions/5852389/bash-autocomplete-doesnt-escape-space-and-doesnt-mark-directories-in-ubuntu-11
[2] http://forums.adobe.com/thread/745833

Chrescht (sekateur) wrote :

I installed acroread from the binary file from adobe.com and did not have a /etc/bash_completion.d/acroread.sh file.
Uninstalling the latter and installing from canonical with "apt-get install acroread" have me back a working bash_completion.
Ubuntu 12.04.1 LTS
3.2.0-32-generic
acroread 9.4.7

screamwork (scream-work) wrote :

#10 - removing acroread.sh did it for me. thx

Shervin Asgari (shervin) wrote :

I have the same problem. Trying to delete the acroread file and hopefully it will work

Greg (greg.rundlett) wrote :

#10 works for me. Thanks Leo.

There is some debate at https://bugs.launchpad.net/ubuntu/+source/acroread/+bug/769866 whether there is a bug in the underlying bash_completion script as well.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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