rossrv show tab complete
Is there a way to get rossrv show
to have tab-complete functionality? Something like this would be nice: rossrv show <package_name>
tab tab
and then this lists the services in that package.
My current workaround is this: roscat <package_name> *.srv
and then selecting the appropriate .srv
file I want to look at (which I suppose isn't that bad either).
Here's the output of rossrv show
tab tab
:
102:roscpp_tutorials/ 176:tf/ 19:control_msgs/ 56:laser_assembler/
67:nodelet/ 120:rospy_tutorials/ 181:tf2_msgs/ 26:diagnostic_msgs/
5:beginner_tutorials/ 78:polled_camera/ 164:sensor_msgs/ 186:topic_tools/
28:dynamic_reconfigure/ 60:map_msgs/ 99:roscpp/
173:std_srvs/ 191:turtlesim/ 33:gazebo_msgs/ 66:nav_msgs/
Just about every
ros*
command(let) has tab completion support. So if it's not working for you, something is wrong.Which platform are you on? Which CPU arch? Which OS? How did you install ROS? Do you have
bash-completion
installed (assuming you are usingbash
of course)?Sorry I should have been more clear.
rossrv show
does have tab completion support, but it shows the output above. When I try to enter something like the5:beginner_tutorials
entry or any of the other entries above it doesn't tab complete. Is this the same behavior on your machine?I'm using ROS Kinetic and I'm running Ubuntu 16.04 on an x86 laptop. I installed ROS the way it was mentioned on the ROS tutorials wiki:
sudo apt-get install ros-kinetic-desktop-full
. I believe I havebash-completion
? Not sure how to check. And yes I am runningbash
It most likely doesn't auto-complete because that
5:
is not supposed to be there.Try this:
That should show you all the service defs in that package.
I don't know where those nrs come from. That would be something to investigate.
Right I've tried that too. In that case, <tab tab=""> doesn't produce any output (it doesn't tab-complete to anything). Perhaps something is wrong with my installation then if the numbers aren't supposed to be there?
I only know that I've never seen auto-complete output show me those number prefixes. Perhaps something has changed in
bash
or on Ubuntu. You could see whether trying this in a Docker container .... (
osrf/ros:kinetic-desktop
) does work (although I've had trouble getting auto-complete to work reliably in containers).If you have another machine, you could try it there. Or in a VM.
Ok thanks for the help. I'll give that a shot if my workaround starts to get annoying.