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@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-----
--- /tmp/bash_completion	2014-03-12 21:20:18.961413462 +0000
+++ /usr/share/bash-completion/bash_completion	2014-03-12 21:20:50.361596183 +0000
@@ -707,7 +707,7 @@
         fi
     done
 
-    [[ $cword -eq 0 ]] && return 1
+    [[ $cword -le 0 ]] && return 1
     prev=${words[cword-1]}
 
     [[ ${split-} ]] && _split_longopt && split=true

Reply via email to