Bug 652555

Summary: <TAB> in bash_completion has changed behavior (regression?)
Product: [Fedora] Fedora EPEL Reporter: Allen Hewes <allen>
Component: bash-completionAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: el5CC: sheltren, ville.skytta
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: bash-completion-1.2-4.el5.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-03 17:02:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Allen Hewes 2010-11-12 08:00:37 UTC
Description of problem:
When running commands with sudo, on previous versions of bash_completion, hitting tab worked as expected; show the possible path(s). The latest version of bash_completion has been changed and now it's getting in the way.

I use to be able to do:

(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /var/

and it would work as expected.

Now, it does this odd thing;

(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /v-bash: complete: more: no completion specification
ar/

You can't backspace to get rid of the warning; so you don't know where you are on the line. You basically have to bail out and start a new command. ugh!



Version-Release number of selected component (if applicable):
bash-completion-1.2-4.el5
bash-completion-1.2-3.el5


How reproducible:
100% of the time.


Steps to Reproduce:
1. Install/update to bash_completion-1.2-{3,4}.el5
2. Logout
3. Login
4. Start typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>
  
Actual results:
(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /v-bash: complete: more: no completion specification
ar/


Expected results:
(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /var/


Additional info:
I messed around with this a little bit and thought it was due to changes in _root_command or _command, but it doesn't look like it. So I created a ticket for this.

$ rpm -qi bash-completion
Name        : bash-completion              Relocations: (not relocatable)
Version     : 1.2                               Vendor: Fedora Project
Release     : 3.el5                         Build Date: Mon 04 Oct 2010 12:23:25 PM EDT
Install Date: Fri 12 Nov 2010 02:12:55 AM EST      Build Host: ppc06.phx2.fedoraproject.org
Group       : System Environment/Shells     Source RPM: bash-completion-1.2-3.el5.src.rpm
Size        : 0                                License: GPLv2+
Signature   : (none)
Packager    : Fedora Project
URL         : http://bash-completion.alioth.debian.org/
Summary     : Programmable completion for Bash
Description :
bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of bash.

(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /v-bash: complete: more: no completion specification
ar/

$ complete | grep sudo
complete -o filenames -F _root_command gksudo
complete -o filenames -F _root_command kdesudo
complete -o filenames -F _root_command sudo


$ rpm -qi bash-completion
Name        : bash-completion              Relocations: (not relocatable)
Version     : 1.1                               Vendor: Fedora Project
Release     : 6.el5                         Build Date: Fri 12 Mar 2010 02:22:58 PM EST
Install Date: Thu 04 Nov 2010 02:21:08 AM EDT      Build Host: ppc04.phx2.fedoraproject.org
Group       : System Environment/Shells     Source RPM: bash-completion-1.1-6.el5.src.rpm
Size        : 0                                License: GPLv2+
Signature   : DSA/SHA1, Tue 16 Mar 2010 12:22:23 PM EDT, Key ID 119cc036217521f6
Packager    : Fedora Project
URL         : http://bash-completion.alioth.debian.org/
Summary     : Programmable completion for Bash
Description :
bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of bash 2.

(typing s-u-d-o<space>m-o-r-e<space>/-v<TAB>)
$ sudo more /var/

$ complete | grep sudo
complete -o filenames -F _root_command gksudo
complete -o filenames -F _root_command kdesudo
complete -o filenames -F _root_command sudo

Comment 1 Allen Hewes 2010-11-12 08:02:06 UTC
It works as expected in bash_completion-1.1-6.el5.

Comment 2 Ville Skyttä 2010-11-12 17:33:02 UTC
This looks indeed like a regression I didn't notice in 1.2, affecting only EPEL as far as I know (it works fine in Fedora which has bash >= 4), and only commands that do not have a completion installed.

Thanks for pointing it out, I'll look into it.

Comment 3 Fedora Update System 2010-11-12 18:30:32 UTC
bash-completion-1.2-4.el5.1 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/bash-completion-1.2-4.el5.1

Comment 4 Fedora Update System 2010-11-14 17:28:52 UTC
bash-completion-1.2-4.el5.1 has been pushed to the Fedora EPEL 5 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: https://admin.fedoraproject.org/updates/bash-completion-1.2-4.el5.1

Comment 5 Allen Hewes 2010-11-15 19:03:59 UTC
Ville,

I can confirm that bash-completion-1.2-4.el5.1.noarch.rpm solves my issue.

Thanks!

Comment 6 Ville Skyttä 2010-11-15 19:17:17 UTC
Good to hear.  If you can, please provide the positive feedback through the link in comment 4 (see "Add a comment >>" in that page).

Comment 7 Fedora Update System 2010-11-16 19:16:16 UTC
bash-completion-1.2-4.el5.2 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/bash-completion-1.2-4.el5.2

Comment 8 Fedora Update System 2010-12-03 17:01:49 UTC
bash-completion-1.2-4.el5.2 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.