[Bug 1289597] Re: bash: words: bad array subscript

Max Bowsher __ at maxb.eu
Mon Mar 10 05:44:59 UTC 2014


** Branch linked: lp:~j/bash-completion/bug1289597

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1289597

Title:
  bash: words: bad array subscript

Status in “bash-completion” package in Ubuntu:
  Confirmed

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):

      prev=${words[cword-1]}

  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597/+subscriptions



More information about the foundations-bugs mailing list