roscd autocompletion configuration

asked 2016-07-03 04:39:10 -0500

Hi,

I am trying to configure some bash scripts and aliases and I want to leverage the autocompletion of roscd. Example, in my .bash_aliases I have the following:

my_pkg() {
  roscd $1
  nautilus .
  exit
}

In order to get autocompletion in parameter 1 I have to create an entry on /etc/bash_completion.d/ proposing the options available. Is there any environment variable or any bash script that returns the list of rospackages in the current workspace? How does roscd do it?

Thanks!

edit retag flag offensive close merge delete