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

to support complete for rosidl and avoid calling multiple compinit #702

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

Conversation

iuhilnehc-ynos
Copy link
Contributor

Signed-off-by: Chen Lihui [email protected]

@iuhilnehc-ynos
Copy link
Contributor Author

to fix ros2/ros2_documentation#2944

@mjbogusz
Copy link

Cross-ref ros2/ros2cli#534

@mjbogusz
Copy link

If I understand correctly, this solution relies on checking whether functions compdef and complete exists and assumes that if so, then they must have been called.
This MIGHT conflict with other systems/scripts that either utilize completion or define functions with such names. For example I have NVM installed (note: the nvm script merely calls bashcompinit):

$ type compdef
compdef is a shell function from /usr/share/zsh/functions/Completion/compinit
$ type complete
complete is a shell function from /home/mjbogusz/.nvm/bash_completion

Note however that this might not be a problem at all, I'm just documenting my observations.

mjbogusz added a commit to mjbogusz/rosidl that referenced this pull request Jan 17, 2023
mjbogusz added a commit to mjbogusz/rosidl that referenced this pull request Jan 17, 2023
Based on Chen Lihui's (@iuhilnehc-ynos) PR: ros2#702

Signed-off-by: Maciej Bogusz <[email protected]>
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.

2 participants