[Bash-completion-devel] Bug#741479: bash-completion: Fails with bash: words: bad array subscript

Claudio Moretti flyingstar16 at gmail.com
Wed Mar 12 21:27:29 UTC 2014


Package: bash-completion
Version: 1:2.1-2
Severity: important
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Maintainer,

when "double tabbing" on a newly opened shell, an error is printed on
the console (instead of the list of files)

claudio at Chuck:/etc/bash_completion.d$ bash: words: bad array subscript

This bug was reported also on Launchpad[1] for Ubuntu, and from there I
retrieved the fix, which is changing line 710 of
/usr/share/bash-completion/bash_completion
from

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

to 

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

I've attached my patch.

Thanks,

Claudio

[1] https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597

- -- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (1001, 'unstable'), (600, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash  4.3-2
ii  dpkg  1.17.6

bash-completion recommends no packages.

bash-completion suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlMg0T8ACgkQZ0Gi6TDJB+fDSACgorxDZAxfqL5677jaHXO6zemD
LZQAn2Xgj4cvdAjJnJNlbShqZHNl0U5f
=djIY
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_bad_array.patch
Type: text/x-diff
Size: 343 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20140312/ee0d383a/attachment.patch>


More information about the Bash-completion-devel mailing list