Compare commits

...

2 Commits

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
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"
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}"
}
# (( ${+ZSH_ROS2_ROOT} )) || return
(( ${+ZSH_ROS2_ROOT} )) || return
local defined=()
local file
for file in "${ZSH_ROS2_ROOT}/bin/"*; do
echo Checked $file
local base="${file:t}"
hash -- "${base}" 2>/dev/null && continue
defined+=("${base}")
@ -32,6 +33,7 @@ done
local exec
for exec in ${defined}; do
echo Defined $exec
eval "
function \${(q)exec} {
printf 'Setting up ros2 with \"%s\"...\n\n' \\