Public bug reported: 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) ** Affects: bash-completion (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1289597 Title: bash: words: bad array subscript To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs