catkin script. it changes to catkin_workspace/src, compiles and goes back to the original folder. You have to move it to /etc/bash_completion.d/. Probably also change the folder of the workspace of catkin