Fix ros2 stuff

This commit is contained in:
Alexander Rosenberg 2025-02-15 22:41:04 -08:00
parent 4348e98b97
commit b57afeec32
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 4 additions and 2 deletions

View File

@ -260,7 +260,7 @@ source "${ZSH_CONFIG_DIR}/emacs-bookmark.zsh"
# Ros2 instll on arch # Ros2 instll on arch
if [[ -d /opt/ros/humble/ ]]; then if [[ -d /opt/ros/humble/ ]]; then
# ZSH_ROS2_ROOT=/opt/ros/humble/ ZSH_ROS2_ROOT=/opt/ros/humble/
source "${ZSH_CONFIG_DIR}/lazy-ros2.zsh" source "${ZSH_CONFIG_DIR}/lazy-ros2.zsh"
fi fi

View File

@ -14,12 +14,13 @@ function __zsh_load_ros2 {
export PYTHONPATH="/opt/ros/humble/lib/python3.13/dist-packages/:/opt/ros/humble/lib/python3.13/site-packages:${PYTHONPATH}" export PYTHONPATH="/opt/ros/humble/lib/python3.13/dist-packages/:/opt/ros/humble/lib/python3.13/site-packages:${PYTHONPATH}"
} }
# (( ${+ZSH_ROS2_ROOT} )) || return (( ${+ZSH_ROS2_ROOT} )) || return
local defined=() local defined=()
local file local file
for file in "${ZSH_ROS2_ROOT}/bin/"*; do for file in "${ZSH_ROS2_ROOT}/bin/"*; do
echo Checked $file
local base="${file:t}" local base="${file:t}"
hash -- "${base}" 2>/dev/null && continue hash -- "${base}" 2>/dev/null && continue
defined+=("${base}") defined+=("${base}")
@ -32,6 +33,7 @@ done
local exec local exec
for exec in ${defined}; do for exec in ${defined}; do
echo Defined $exec
eval " eval "
function \${(q)exec} { function \${(q)exec} {
printf 'Setting up ros2 with \"%s\"...\n\n' \\ printf 'Setting up ros2 with \"%s\"...\n\n' \\