Tab expansion only auto-completes directory names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| bash-completion (Debian) |
Fix Released
|
Unknown
|
||
| bash-completion (Ubuntu) |
High
|
Matthias Klose |
Bug Description
Under bash 4.3, tab expansion only auto-completes directory names. Steps to reproduce:
# Preparation
D=$(mktemp -d)
cd $D
touch a
mkdir b c
# test
vi # (press tab tab)
b/ c/
Notice the file "a" isn't proposed in the listing, only the 2 directories ("b" and "c").
$ lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
$ apt-cache policy bash-completion bash
bash-completion:
Installed: 1:2.1-2ubuntu2
Candidate: 1:2.1-2ubuntu2
Version table:
*** 1:2.1-2ubuntu2 0
500 http://
100 /var/lib/
bash:
Installed: 4.3-1ubuntu2
Candidate: 4.3-1ubuntu2
Version table:
*** 4.3-1ubuntu2 0
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: bash-completion 1:2.1-2ubuntu2
ProcVersionSign
Uname: Linux 3.13.0-15-generic x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Mar 4 21:39:35 2014
InstallationDate: Installed on 2014-01-26 (37 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140124)
PackageArchitec
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Luke Yelavich: Needs Fixing on 2014-03-13
-
Diff: 80 lines (+42/-1)4 files modified.pc/applied-patches (+1/-0)
bash_completion (+11/-1)
debian/patches/quote_readline_by_ref_fixes.patch (+29/-0)
debian/patches/series (+1/-0)
Simon Déziel (sdeziel) wrote : | #1 |
Simon Déziel (sdeziel) wrote : | #2 |
Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in bash-completion (Ubuntu): | |
status: | New → Confirmed |
tags: | added: regression-proposed |
tags: |
added: regression-release removed: regression-proposed |
Changed in bash-completion (Ubuntu): | |
assignee: | nobody → Matthias Klose (doko) |
importance: | Undecided → High |
Changed in bash-completion (Debian): | |
status: | Unknown → New |
JuanJo Ciarlante (jjo) wrote : | #4 |
This MP[1] seems to fix this issue for me.
[1] https:/
JuanJo Ciarlante (jjo) wrote : | #5 |
FTR the issue is _quote_
$ _quote_
$ echo $foo
''
Above MP adds a special case to avoid quoting if empty.
Agus Lopez (itinlopez) wrote : | #6 |
FWIW, disabling progcomp shell option fixes the problem.
$ shopt -u progcomp
$ vi # <TAB> <TAB>
a b/ c/
From bash manpage (http://
> progcomp: If set, the programmable completion facilities (see Programmable Completion above) are enabled. This option is enabled by default.
Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package bash-completion - 1:2.1-2ubuntu4
---------------
bash-completion (1:2.1-2ubuntu4) trusty; urgency=medium
* fix _quote_
- avoid escaping 1st '~' (lp: #1288314)
- avoid quoting if empty, else expansion without args only shows dirs
(lp: #1288031)
- replace double escaping to single (eg for completing file/paths with
spaces)
-- JuanJo Ciarlante <email address hidden> Thu, 13 Mar 2014 19:43:22 -0300
Changed in bash-completion (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in bash-completion (Debian): | |
status: | New → Fix Released |
shanec (shane-cousins) wrote : | #8 |
Still seeing this issue with python command line scripts. Even after running apt-get update/upgrade for 14.04.
cmdline.py ::
-------
import argparse
parser = ArgumentParser(
parser.
args = parser.parse_args()
print 'Filename: {}'.format(
-------
$ python cmdline.py -f ~/[tab] [tab] [tab]
only returns directories, no files are listed.
$lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
$ apt-cache policy bash-completion bash
bash-completion:
Installed: 1:2.1-4
Candidate: 1:2.1-4
Version table:
*** 1:2.1-4 0
500 http://
100 /var/lib/
bash:
Installed: 4.3-7ubuntu1
Candidate: 4.3-7ubuntu1
Version table:
*** 4.3-7ubuntu1 0
500 http://
100 /var/lib/
4.3-6ubuntu1 0
500 http://
Ville Skyttä (vskytta) wrote : | #9 |
FYI, the _quote_
This is possibly the same as described in https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 739835