Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosbash: zsh auto-completion issues #48

Closed
2 of 4 tasks
jbohren opened this issue Mar 27, 2014 · 12 comments
Closed
2 of 4 tasks

rosbash: zsh auto-completion issues #48

jbohren opened this issue Mar 27, 2014 · 12 comments

Comments

@jbohren
Copy link
Member

jbohren commented Mar 27, 2014

  • roslaunch: good
  • rosrun:
    • package auto-completes
    • executable does not autocomplete for installed executables
    • executable autocompletes git hooks in addition to executables
  • roscd: good
  • rostopic pub:
    • topic name auto-completes
    • message type auto-completes (but it would be nice if this was determined automatically if the topic is already subscribed to)
    • message cmd-line YAML does not autocomplete
@dirk-thomas
Copy link
Member

Thanks for summarizing the state that detailed. Please consider to provide patches for improved zsh support. Since most people are only using bash this won't be high on the priority list.

@dirk-thomas dirk-thomas added this to the untargeted milestone Mar 27, 2014
@dirk-thomas
Copy link
Member

@wjwwood since you use zsh on Mac you might want to take a look at this at some point.

@trainman419
Copy link
Contributor

Tab-completion for installed executables in rosrun should be fixed in bba9428

@bajo
Copy link
Contributor

bajo commented Aug 4, 2014

@jbohren Could you shed a little light on the issue that rosrun is not able to autocomplete installed executables? Can you try a current version and report if this still is a problem, because I think @trainman419 resolved this in bba9428

If this is the case you could update and close this issue as this and the rostopic autocompletion dc18b00 are working now.

Thanks.

@dirk-thomas
Copy link
Member

It seems to also work for me. Therefore closing the ticket for now. If there is more information about what is not working please feel free to comment and it can be reopened.

@dirk-thomas dirk-thomas removed this from the untargeted milestone Dec 9, 2014
@furushchev
Copy link

Was this issue solved? I still doubt it does work on zsh when rosrun and rostopic.

@bajo
Copy link
Contributor

bajo commented Sep 15, 2015

@furushchev Can you describe what exactly is not working for you?
I just tested it with rostopic pub and it completed it to
rostopic pub /rosout rosgraph_msgs/Log "header:
seq: 0
stamp: {secs: 0, nsecs: 0}
frame_id: ''
level: 0
name: ''
msg: ''
file: ''
function: ''
line: 0
topics: ['']"

rosrun rv autocompletes to rosrun rviz rviz. Just as expected.
The roszsh file i am using on Ubuntu 14.04 with indigo is from commit 56eb517

@edobez
Copy link

edobez commented Sep 16, 2015

Zsh completion with rosrun is still not working for me on Ubuntu 14.04/Indigo.
The completion could find the package, but throws an error when trying to complete the executable.

This is what comes out when I try to complete view_frames from tf package:
find: /opt/ros/indigo/lib/tf\n/opt/ros/indigo/lib/tf': No such file or directory

@dirk-thomas
Copy link
Member

@edobez I think what you are seeing is #83 which will be addressed with an upcoming release.

@bajo
Copy link
Contributor

bajo commented Sep 16, 2015

@edobez @dirk-thomas At first I could not reproduce this as well, but i think I now know how I can get it to show at least for my setup. I work on a few different projects which are in their own catkin workspaces. In my .zshrc I only source /opt/ros/indigo/setup.zsh . Whenever I need a certain project I source the projects devel/setup.zsh as well.

When I start a terminal the autocompletion works fine and just as expected. As soon as I source one of my projects setup.zsh the same error as @edobez reported showed up.
I think the issue is that in function _roscomplete_search_dir we execute catkin_package_libexec_dir=catkin_find --without-underlays --libexec ${pkg} 2> /dev/null which will return /opt/ros/indigo/lib/tf\n/opt/ros/indigo/lib/tf in the case of the tf package. This is of course no valid path for the following find command which is exactly the reported error.

As the catkin_find command has the nice switch --first-only that can take care of this issue we can solve this quite easy by adding this to the catkin_find command.
Ah, just saw that this is already in the branch for jade, so never mind. ;-)

@furushchev
Copy link

@bajo Sorry for very late response. I chekced on hydro / ubuntu 12.04. (rosbash version is 0.10.11)
So is hydro already deprecated?

@dirk-thomas
Copy link
Member

Hydro has been EOL for quite a while (May 2015) and the build farm has been decommissioned by now. So there will for sure be no released into Hydro anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants