Using the following in my .bashrc instead of the current 3 related lines
fixes the problem for me:

----
if [ -z "$SOURCE_COMPLETION" -a -f /etc/bash_completion ]; then
    . /etc/bash_completion
    SOURCE_COMPLETION=1
fi
----

It makes sure that bash_completion is only sourced once per shell.

The follow transcripts show how sourcing /etc/bash_completion a second
time causes different behaviour on hardy and sid:

----
(hardy)[EMAIL PROTECTED]:~$ bash --norc
bash-3.2$ . /etc/bash_completion
bash-3.2$ echo $?
0
bash-3.2$ . /etc/bash_completion
bash-3.2$ echo $?
1
----

----
(sid)[EMAIL PROTECTED]:~$ bash --norc
bash-3.1$ . /etc/bash_completion
bash-3.1$ echo $?
0
bash-3.1$ . /etc/bash_completion
bash-3.1$ echo $?
0
----

-- 
bash_completion erroneously returns
https://bugs.launchpad.net/bugs/164440
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to