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

ZSH argcomplete: call compinit only if needed #750

Merged
merged 1 commit into from
Jan 13, 2023
Merged

ZSH argcomplete: call compinit only if needed #750

merged 1 commit into from
Jan 13, 2023

Conversation

mjbogusz
Copy link
Contributor

Ref #534

Signed-off-by: Maciej Bogusz <mjbogusz+github@gmail.com>
@mjbogusz mjbogusz marked this pull request as ready for review December 9, 2022 13:08
@nachovizzo
Copy link

I manually patched this file and didn't solve the problem in my case. I just threw this into my .zshrc in the meantime (and it's working)

function ros2_setup () {
  source /opt/ros/humble/setup.zsh
  complete -o nospace -o default -F _python_argcomplete "ros2"
}

@mjbogusz
Copy link
Contributor Author

mjbogusz commented Jan 26, 2023

This is only one of several places where compinit is called - see the list in referenced discussion. In particular I think sourcing ROS by default pulls in ros2cli, rosidl and ament_index, but depending on colcon hooks of your installed packages this may vary.

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

Successfully merging this pull request may close these issues.

None yet

3 participants