Opened 12 years ago

Closed 12 years ago

#35352 closed defect (invalid)

bash-completion @2.0 broken after upgrade

Reported by: lars.mai@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: bash-completion

Description

Hi,

i did some port upgrade outdated lately and my bash completion stopped working afterwards. I investigated briefly and noticed that the script in /opt/local/share gives errors when sourced manually:

lars@mbp-5:~$ . /opt/local/share/bash-completion/bash_completion 
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: complete: -D: invalid option
complete: usage: complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...]

here's info from port info:

lars@mbp-5:~$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)

Description:          Programmable completion library for bash. This port requires bash >=4.1 and is meant to be used together with the bash port.
Homepage:             http://bash-completion.alioth.debian.org/

Runtime Dependencies: bash
Conflicts with:       bash-completion-devel
Platforms:            darwin
License:              GPL-2+
Maintainers:          raimue@macports.org

and my bash version:

lars@mbp-5:~$ bash --version
GNU bash, version 4.2.37(2)-release (i386-apple-darwin10.8.0)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Change History (1)

comment:1 Changed 12 years ago by neverpanic (Clemens Lang)

Resolution: invalid
Status: newclosed
bash --version

being 4.2 is not sufficient for bash completion to work; it merely says the bash binary first in your $PATH is 4.2, but that isn't necessarily what your terminal emulator starts when opening a new terminal.

Try

echo $BASH_VERSION

to see which version of bash you are currently running (and unless you changed it as described in port notes bash-completion) it probably is /bin/bash, which is version 3.something.

Note: See TracTickets for help on using tickets.