tab completion fails when files have same prefix that ends in a quote/escapable-char
Bug #123665 reported by
Yuki Izumi
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Debian) |
Fix Released
|
Unknown
|
|||
bash-completion (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bug Description
Binary package hint: bash
If two (or more) files have the same prefix that ends in a quote (double, single, take your pick), or some other escapable character (back-slash is my test case), but then something else, tab completion will fail! Here's how to reproduce:
1. Run: touch "1'1 1" "1'2 2"
2. Type: rm 1\'
3. Attempt to tab complete. bash will suggest the two files.
4. Give a hint by entering 1.
5. Attempt to tab complete again. bash is dumb-founded.
This occurs with single- and double-quotes, and backslashes -- but *not* with with spaces. Other cases are untested.
Checked as problematic on feisty and gutsy.
Related branches
description: | updated |
Changed in bash-completion (Ubuntu): | |
assignee: | Mika Fischer (zoop) → nobody |
tags: | added: testcase |
Changed in bash-completion (Ubuntu): | |
importance: | Undecided → Medium |
Changed in bash-completion (Debian): | |
status: | Unknown → Confirmed |
Changed in bash-completion (Debian): | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
I can confirm this on a current hardy install.
It is a problem with bash, not bash-completion.
In the given test-case compgen -f does not work correctly:
$ touch "1'1 1" "1'2 2"
$ compgen -f 1\'
1'2 2
1'1 1
$ compgen -f 1\'1
$ echo $?
1