I have bash-completion installed using macports and following lines in my .bash_profile
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
but the completion doesn't work when I open Terminal, however it starts working after sourcing .bash_profile or after 'bash -l'.
I'm running OSX 10.6, in Terminal preferences there is "Shell opens with: Default login shell (/usr/bin/login)" selected.
Solved: What I missed is line in How to use bash-completion
Make sure you add this after any PATH manipulation as otherwise the bash-completion will not work correctly.
when I moved the lines after PATH manipulation everything works fine.