[Bash-completion-devel] Bug#556280: regression: /etc/bash_completion: line 967: syntax error

Kevin Mitchell kevmitch at math.sfu.ca
Sun Nov 15 08:43:58 UTC 2009


Package: bash-completion
Version: 1:1.1-2
Severity: normal


Just updated bash-completion today and have begun seeing the following 
message whenever a new bash instance starts up and sources the
bash_completion file:

bash: /etc/bash_completion: line 967: syntax error near unexpected token `{'
bash: /etc/bash_completion: line 967: `        else if ($1 !~ /:/ && $1 ~ /^'"$cur"'/) { print $1 }}'

It is in the insmod section. The following if statment is totally messed
up:

       if [ $COMP_CWORD -gt 1 ] &&
            [[ "${COMP_WORDS[COMP_CWORD-1]}" != -* ]]; then
            # do module parameter completion
            COMPREPLY=( $( compgen -W "$( /sbin/modinfo -p ${COMP_WORDS[1]} | \
                cut -d: -f1 )" -- "$cur" ) )
        else if ($1 !~ /:/ && $1 ~ /^'"$cur"'/) { print $1 }}' ) )
        else
            _modules $(uname -r)
        fi

There are a bunch of unmatched quotes and parentheses near that else
if. Beyond that however, I must apologise that it is voodoo to me.

Kevin

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'testing'), (300, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-rc6.007-wl (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) (ignored: LC_ALL set to en_GB)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash                          4.0-7      The GNU Bourne Again SHell

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information





More information about the Bash-completion-devel mailing list