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

Autocompletion in zsh failes #2944

Open
Fildo7525 opened this issue Aug 13, 2022 · 6 comments
Open

Autocompletion in zsh failes #2944

Fildo7525 opened this issue Aug 13, 2022 · 6 comments
Labels

Comments

@Fildo7525
Copy link

When I used ros2 Foxy on Ubuntu 20.04 in zsh everything was ok. Now I changed to Ubuntu 22.04 and to Humble and the autocompletion is not working for ros2

@mjbogusz
Copy link

mjbogusz commented Aug 22, 2022

Same issue?: ros2/ros2cli#534

However, for me Foxy/Galactic on 20.04 is spotty at best as well

@endrelaszlo
Copy link

Same issue?: ros2/ros2cli#534

However, for me Foxy/Galactic on 20.04 is spotty at best as well

I had the same issue that the current ticket describes (env: Ubuntu 22.04+Humble) and the solution came from the issue referenced by @mjbogusz. Thanks!

Solution/workaround by @chenjunn-s comment: ros2cli/issues/534#issuecomment-957516107

By adding these lines to .zshrc the argcompletion is succesfully enabled.

# argcomplete for ros2 & colcon
eval "$(register-python-argcomplete3 ros2)"
eval "$(register-python-argcomplete3 colcon)"

Note: If the registration fails, check whether your python environment has the argcomplete package installed.

@fujitatomoya
Copy link
Collaborator

@Fildo7525 @endrelaszlo @mjbogusz either of you guys, would you mind if trying ros2/rosidl#702 to see if the problem can be solved?

@Fildo7525
Copy link
Author

Fildo7525 commented Jan 15, 2023

endrelaszlo your comment (https://github.com/endrelaszlo) worked. The only thing I would add is to put this lines before sourcing ros.

@SammyRamone
Copy link

endrelaszlo your comment (https://github.com/endrelaszlo) worked. The only thing I would add is to put this lines before sourcing ros.

It also worked for me (Ubuntu 22.04 / Rolling), but only if I put it after sourcing ROS. So if somebody else runs into this issue, maybe try both options 🤷

@ahamboeck
Copy link

This works for jazzy / ubuntu 24.04 with zsh

argcomplete for ros2 & colcon in zsh

eval "$(register-python-argcomplete ros2)"
eval "$(register-python-argcomplete colcon)"

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

No branches or pull requests

7 participants