Defined bash function rte()
:
$ function rte(){ rostopic echo $@ ; };
and attempted to use rostopic
's completion function
$ complete -p rostopic
complete -F _roscomplete_rostopic rostopic
via the command:
$ complete -F _roscomplete_rostopic rte
The above setting can be verified as follows:
$ complete -p rte
complete -F _roscomplete_rostopic rte
However, rte <partial input><tab>
does not offer completions.
Question: How to get rte()
to use rostopic
's completion? I guess when rte()
's completion calls rostopic
's completion, the context echo
needs to be provided to rostopic
's completion (i.e., COMP_WORDS
needs to contain echo
).