autocompletion fails to work entirely for some commands (e.g. mount)

Bug #742041 reported by Ngassam Nkwenga
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: bash

not tab completion when providing a file we want to work with.

here is what I mean :

natty@natty-PCV-RSM22-CE:~/Documents$ sudo mount -o loop natty-alternate-i386.iso /cdrom

I had to manually add "natty-alternate-i386.iso " and cdrom . It was not the case in the past.

This is regression for the bash's behavior

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: bash 4.2-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-7.35-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Thu Mar 24 21:25:46 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110318)
LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110323)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bash
UpgradeStatus: Upgraded to natty on 2011-03-24 (0 days ago)

Revision history for this message
Ngassam Nkwenga (cyrildz) wrote :
Revision history for this message
Tim Frost (timfrost) wrote :

In natty, if the type characters match a singe directory entry, pressing the TAB key results in the matching entry, with:
1: A space following
2: No escaping of embedded spaces or special characters

This is NOT related to unity - it appears for the classic desktop as well

In previous releases, bash would do the following:
1: For embedded spaces, they would be escaped with a single backslash ("\")
2: If the match was a directory, the displayed match would terminate with "/' (eg "Desktop/") and NO trailing space
3: A trailing space would be appended ONLY in the case where there was a single file name that matched when the TAB was pressed

bash version:

tim@zaphod:~$ bash --version
GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
tim@zaphod:~$ lsb_release -a
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu Natty (development branch)
Release: 11.04
Codename: natty
tim@zaphod:~$

Revision history for this message
Matt Behrens (zigg) wrote :

Confirming originally reported behavior. Also see bug 769866 for other bash completion failures in natty, which include what @Tim Frost is talking about in comment 2.

Changed in bash (Ubuntu):
status: New → Confirmed
tags: added: regression-release
summary: - bash doesn't provide auto-completion more
+ autocompletion fails to work entirely for some commands (e.g. mount)
Revision history for this message
Matt Behrens (zigg) wrote :

Despite bug 769866 looking inexplicably fixed today, this is still not working on my system (yet still does work on lucid), using the "sudo mount" testcase. mount does work without sudo, though the command itself fails obviously (only root can do that). :-)

Revision history for this message
Daniel Smedegaard Buus (danielbuus) wrote :

I'd like to point to the *original* poster's (i.e. Ngassam's) description of the issue. 769866 is not the same issue.

The issue at hand here is that some commands (e.g. the mount command) fail autocompletion when prefixed with sudo. Using "mount" as regular user will autocomplete on tabbing in order to find source device and mount target folder paths. Same applies if logged in as root. When prefixing "sudo" tab path autocompletion stops working.

This applies to Oneiric and Natty, in X sessions, TTYs and SSH. Not sure if it applied to Maverick -- AFAIR it didn't.

Revision history for this message
Daniel Smedegaard Buus (danielbuus) wrote :

As the bug continues to exist with Precise, maybe it's time to actually assign this to someone, perhaps give it some importance? :)

Revision history for this message
Daniel Smedegaard Buus (danielbuus) wrote :

FWIW, the fix is apparently quite trivial:

http://ubuntuforums.org/showthread.php?t=1769100

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.