python tab-completion error: bash: COMP_WORDS: bad array subscript
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: bash-completion
When I'm specifying the full path to a Python interpreter (which is very common for Python developers who use zc.buildout or virtualenv), attempting tab-completion of the first argument results in errors.
To reproduce:
1. touch python script.py
2. chmod +x python
3. type ./python scri<tab>
Expected output:
./python script.py
Actual output:
./python scribash: COMP_WORDS: bad array subscript
pt.py
The bug is in /etc/bash_
[[ ${COMP_
with
[[ $COMP_CWORD -ge 2 ]] && [[ ${COMP_
then completion works without emitting spurious errors.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: bash-completion 1:1.2-2ubuntu1.1
ProcVersionSign
Uname: Linux 2.6.35-28-generic i686
Architecture: i386
Date: Wed Mar 30 17:55:42 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
PackageArchitec
ProcEnviron:
LANGUAGE=
LC_CTYPE=
PATH=(custom, user)
LANG=lt_LT.utf8
SHELL=/bin/bash
SourcePackage: bash-completion
Changed in bash-completion (Ubuntu): | |
status: | New → Fix Released |
This appears to be fixed in bash-completion 1:1.3-1ubuntu3 from natty.