views:

211

answers:

2

I've tried to load bash_completion in my bash (3.2.25), it does not work. No message etc. I've used the following in my .bashrc

if [ -f ~/.bash_completion ]; then
  . ~/.bash_completion
fi

I also tried to use .bash_profile instead, but with the same result. So the problem is why does it not work? Any idea? Hints?

A: 

So this may seem like a stupid question, but did you put the subversion bash_completion into a file called .bash_completion or into a file called bash_completion ? (Note the initial dot) What does ls -la bash* .bash* say?

For the snippet above to work, you need the subversion file to be in .bash_completion. If it isn't, do:

mv -i bash_completion .bash_completion
Daniel Martin
I have put that into ".bash_completion" file. incl. the prefixing dot.
khmarbaise
+4  A: 

Simply sourcing that file will produce no output to the terminal. All it does is define a bunch of functions. Once you've sourced it, you should be able to do tab completions on svn commands. Type svn Spaceand press Tab twice. You should see a list of svn commands.

Dennis Williamson
Oh my lord. I was running into the wrong direction. It works.
khmarbaise