Installation of the acroread package causes completion to treat directories like files with some commands

Bug #752193 reported by Yevgen Muntyan
210
This bug affects 64 people
Affects Status Importance Assigned to Milestone
acroread (Ubuntu)
Fix Released
Undecided
Brian Thomason
bash-completion (Debian)
Fix Released
Unknown
bash-completion (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

Scenario: go to home directory in terminal, then type "ls Deskto" (without quotes) and press Tab. Result: command line completes to "ls Desktop " (with space after "Desktop"). The problem here is that you may want to continue typing to get to a subdirectory. If I recall correctly, in earlier releases the completion would be "ls Desktop/", where you could press Enter or continue typing.
This problem exists with at least 'ls' and 'rm'. It seems more is broken because if in above steps you replace 'ls' with 'tar' then you don't get any completion at all, even though Desktop is a folder and hence can contain some archive file. It looks like completion tries to get a "fully-complete" completion and ignores the possibility of intermediate folders.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: bash-completion 1:1.3-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.41-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Tue Apr 5 21:18:42 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bash-completion
UpgradeStatus: Upgraded to natty on 2011-04-02 (3 days ago)

Revision history for this message
Yevgen Muntyan (muntyan-fastmail) wrote :
Changed in bash-completion (Ubuntu):
status: New → Confirmed
Xavier Bassery (xaba)
summary: - Completion is too jealous for basic commands
+ Completion treats directories like files with some commands
Revision history for this message
Xavier Bassery (xaba) wrote : Re: Completion treats directories like files with some commands

I could not reproduce this bug, but according to the duplicates here are some more details about commands that trigger this bug:

Not working: cat, ls, less, rm, mkdir
Working: cd, vim, more

Revision history for this message
Mario Limonciello (superm1) wrote :

This bug is caused by installation of the 'acroread' package according the debian bug report. I had version 9.4.2-0maverick1 installed. I purged the package on my system and respawned a bash shell and it went away.

Debian marked it Won't Fix because it needs to be fixed in the acroread package itself.

Changed in bash-completion (Ubuntu):
status: Confirmed → Won't Fix
summary: - Completion treats directories like files with some commands
+ Installation of the acroread package causes completion to treat
+ directories like files with some commands
Changed in bash-completion (Debian):
status: Unknown → Won't Fix
Changed in acroread (Ubuntu):
status: New → Confirmed
assignee: nobody → Brian Thomason (brian-thomason)
Revision history for this message
Felix Haller (felixhaller) wrote :

i can ack this problem.

maybe this can help:

when i type:

    nano /etc/defa<tab>

then it completes to

    nano /etc/default/

but when i put a "sudo" in front of the command like:

    sudo nano /etc/defa<tab>

then it completes to

    sudo nano /etc/default

hope it helps

greets
Felix

Revision history for this message
Brian Thomason (brian-thomason) wrote :

This should be fixed in the latest package in Natty.

Revision history for this message
James Sunderland (k-marshal) wrote :

I have exactly the same problem with completion.
It happen after upgrade from 10.10 to 11.04 and i don't have 'acroread' package installed.

Revision history for this message
Plejaden (plejaden) wrote :

@James Sunderland:
the package is also called adobereader, so try:
sudo apt-get remove adobereader-*

This solved it for me

Revision history for this message
James Sunderland (k-marshal) wrote :

What if i need acrobat?

I found another solution:

sudo sed -i "s/_filedir/_filedir_acroread/" /etc/bash_completion.d/acroread.sh

Revision history for this message
Brian Thomason (brian-thomason) wrote :

Which ubuntu release are you using James?

Revision history for this message
Jan Schneider (yunosh) wrote :

The _filedir() function from /opt/Adobe/Reader9/Resource/Shell/acroread_tab can be removed altogether. The builtin _filedir() function from /etc/bash_completion works just fine. Tested on Natty.

Revision history for this message
Jan Schneider (yunosh) wrote :

The _filedir() function from /opt/Adobe/Reader9/Resource/Shell/acroread_tab can be removed altogether. The builtin _filedir() function from /etc/bash_completion works just fine. Tested on Natty.

Revision history for this message
Jan Schneider (yunosh) wrote :

The _filedir() function from /opt/Adobe/Reader9/Resource/Shell/acroread_tab can be removed altogether.

Revision history for this message
Jan Schneider (yunosh) wrote :

The _filedir() function from /opt/Adobe/Reader9/Resource/Shell/acroread_tab can be removed altogether. The builtin _filedir() function from /etc/bash_completion works just fine. Tested on Natty.

Revision history for this message
Jan Schneider (yunosh) wrote :

Sorry for the duplicate posts, Launchpad was broken.

Revision history for this message
Hoffmann (hoffmann-p) wrote :

Maybe this bug is related to #769866?
at least the marked-duplicate #760071 might be rather a duplicate of #769866

Revision history for this message
Martin Weis (martin-weis-newsadress) wrote :

I had to manually deinstall adobereader-deu (version 9.4.2-0maverick1) and install acroread (9.4.2-0natty1). This seems to be a weirdness from dist-upgrade.

Revision history for this message
Philippe Mermod (h-philippe) wrote :

Same problem, which I now realise appeared after I installed acrobat reader. The workaround:
sudo sed -i "s/_filedir/_filedir_acroread/" /etc/bash_completion.d/acroread.sh
worked perfectly well after rebooting. Thanks!

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi, a new acroread release (0.9.4) is available for update, could you give it a try and tell us if the problem persists?
If you still have this bug please set back the status to "new"
thanks

Changed in acroread (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
frankie (frankie-etsetb) wrote :

Works for me

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

I am closing this bug because it is fixed in recent versions of acroread.

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

Other bug subscribers

Related questions

Remote bug watches

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