From 2628102e8c1df2fbca863f03d1b3ba8e82596e65 Mon Sep 17 00:00:00 2001 From: Maciej Bogusz Date: Tue, 17 Jan 2023 14:50:16 +0100 Subject: [PATCH 1/2] ZSH argcomplete: call compinit only if needed Signed-off-by: Maciej Bogusz --- rosidl_cli/completion/rosidl-argcomplete.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rosidl_cli/completion/rosidl-argcomplete.zsh b/rosidl_cli/completion/rosidl-argcomplete.zsh index 9a86dbd23..5aba7cd69 100644 --- a/rosidl_cli/completion/rosidl-argcomplete.zsh +++ b/rosidl_cli/completion/rosidl-argcomplete.zsh @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -autoload -U +X compinit && compinit +if (( ! ${+_comps} )); then + autoload -U +X compinit && compinit +fi autoload -U +X bashcompinit && bashcompinit # Get this scripts directory From c2252c524b44bd7c2e8935063585a7544c39972c Mon Sep 17 00:00:00 2001 From: Maciej Bogusz Date: Tue, 17 Jan 2023 14:50:28 +0100 Subject: [PATCH 2/2] rosidl_cli: add colcon hooks Based on Chen Lihui's (@iuhilnehc-ynos) PR: https://github.com/ros2/rosidl/pull/702 Signed-off-by: Maciej Bogusz --- rosidl_cli/colcon.pkg | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 rosidl_cli/colcon.pkg diff --git a/rosidl_cli/colcon.pkg b/rosidl_cli/colcon.pkg new file mode 100644 index 000000000..623d2898e --- /dev/null +++ b/rosidl_cli/colcon.pkg @@ -0,0 +1,6 @@ +{ + "hooks": [ + "share/rosidl_cli/environment/rosidl-argcomplete.bash", + "share/rosidl_cli/environment/rosidl-argcomplete.zsh" + ] +}