bash: words: bad array subscript

Bug #1289597 reported by Barry Warsaw on 2014-03-07
This bug affects 6 people
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)

Bug Description

cd to your $HOME and without entering anything at the prompt, hit TAB. I get the error in the Subject.

The bug seems obvious: in /usr/share/bash-completion/bash_completion, line 710 you have:

    [[ $cword -eq 0 ]] && return 1

but `set -x` in a bash and doing the above shows $cword to be -1, thus the following line (711):


fails with the error.

The fix is easy. s/-eq/-le/ on 710.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: bash-completion 1:2.1-2ubuntu2 [modified: usr/share/bash-completion/bash_completion]
ProcVersionSignature: Ubuntu 3.13.0-16.36-generic 3.13.5
Uname: Linux 3.13.0-16-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Mar 7 16:37:37 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-12-06 (91 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitecture: all
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)

Barry Warsaw (barry) wrote :
Cbjaxx (cbaudier) wrote :

Attached png image.
Ubuntu Bug Squad volunteer triager

Changed in bash-completion (Ubuntu):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 1:2.1-2ubuntu3

bash-completion (1:2.1-2ubuntu3) trusty; urgency=medium

  * debian/patches/words_bad_array_subscript.patch
    - Fix bash: words: bad array subscript (lp: #1289597)
 -- Jan Gerber <email address hidden> Sun, 09 Mar 2014 17:38:14 +0100

Changed in bash-completion (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers