Bug 1071700 - tab completion doesn't complete regular files with ~ shortcut
Summary: tab completion doesn't complete regular files with ~ shortcut
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-02 23:51 UTC by Matthew Miller
Modified: 2014-09-17 17:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-17 17:28:00 UTC
Type: Bug


Attachments (Terms of Use)
Bash-4.3 fix #1 (1.63 KB, patch)
2014-04-05 12:42 UTC, Vallimar
no flags Details | Diff
01-words_bad_array_subscript.patch (792 bytes, patch)
2014-04-05 12:43 UTC, Vallimar
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.