Bug 1071700

Summary: tab completion doesn't complete regular files with ~ shortcut
Product: [Fedora] Fedora Reporter: Matthew Miller <mattdm>
Component: bash-completionAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ooprala, sheltren, valdis.kletnieks, vallimar, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-17 17:28:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Bash-4.3 fix #1
none
01-words_bad_array_subscript.patch none

Description Matthew Miller 2014-03-02 23:51:07 UTC
Description of problem:

Tab completion doesn't complete regular files with ~ shortcut in path. That is, ~mattdm/[tab] only shows directories, as does ~/tmp/[tab] or whatever.


Version-Release number of selected component (if applicable):

bash-4.3.0-1.fc21.x86_64
bash-completion-2.1-4.fc21.noarch

How reproducible:

always, with bash-completion installed. Without bash-completion, no problem.

Seems to happen with any completion which takes a filename.

Steps to Reproduce:

try to tab complete to such a path as the argument to, e.g. "cat"

Actual results:

only directories shown, or nothing if no directories

Expected results:

files and directories shown.

Additional info:

Comment 1 Ville Skyttä 2014-03-03 08:13:51 UTC
I haven't had a chance to try with bash 4.3.0 myself yet, but I suspect it has something to do with this as this certainly works with earlier versions.

Comment 2 Valdis Kletnieks 2014-03-25 18:08:51 UTC
It's due to bash 4.3 doing printf slightly differently. arch linux and Debian are seeing it as well.

https://bugs.archlinux.org/task/39142 discusses the issue.


No word on whether this bash patch was officially merged yet:
https://lists.gnu.org/archive/html/bug-bash/2014-03/msg00123.html

Hope that info helps.

Comment 3 Vallimar 2014-04-05 12:42:06 UTC
Created attachment 883034 [details]
Bash-4.3 fix #1

Comment 4 Vallimar 2014-04-05 12:43:14 UTC
Created attachment 883035 [details]
01-words_bad_array_subscript.patch

Comment 5 Vallimar 2014-04-05 12:44:51 UTC
I ran into issues after upgrading to bash-4.3 myself, even with latest 4.3.8 release. I rebuilt bash-completion with these Debian/Ubuntu patches meant to address issues stemming with 4.3 and they seem to work from my limited testing.

Comment 6 Ville Skyttä 2014-09-17 17:28:00 UTC
The tilde issue was fixed by bash upstream in bash 4.3 patchlevel 10:
https://lists.gnu.org/archive/html/bug-bash/2014-04/msg00035.html

The bad array subscript one is bug 1135489.