Extending bash completion for a command in rosbash (with catkin_add_env_hooks)
I plan to extend bash completion features for a common ros command (roslaunch) that already has completion defined in rosbash.
My first approach was to modify rosbash, which is quite generic and load my completion from there using rospack. Now, I found this commit using catkin_add_env_hooks to load completion scripts, which seems way more elegant.
First I am assuming this should work in any environment independent if catkin is used, correct?
The problem is that I am adding completion features instead of providing new completion. What is the correct way to do this?
I need to override the rosbash version here. rosbash is from 15.rosbash.bash, so I named my file 20.xxx and this seems to work, although I can't find any guarantees, especially about rosbash staying at 15. Maybe in the longrun the completion should be fully moved out of rosbash anyways and stay in the package that is completed?