Skip to content

Commit

Permalink
rosmon_core: env-hooks: follow symbolic links during file name sugges…
Browse files Browse the repository at this point in the history
…tion

This fixes bash completion for colcon linked install spaces.
  • Loading branch information
xqms committed Oct 14, 2020
1 parent 5b90e17 commit b744e79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rosmon_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if(CATKIN_ENABLE_TESTING)
endif()
endif()

# Version 1.5 (increment this comment to trigger a CMake update)
# Version 1.6 (increment this comment to trigger a CMake update)
catkin_add_env_hooks(50-rosmon
SHELLS bash zsh
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks
Expand Down
2 changes: 1 addition & 1 deletion rosmon_core/env-hooks/50-rosmon.bash
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function _mon() {
# If we have no launch file yet, offer launch files
elif [[ ( ! -f $package_name ) && -z $launch_name ]]; then
local package_dir="$(rospack find ${COMP_WORDS[2]})"
local launchfiles=$(find "$package_dir" -name '*.launch' -type f -printf "%f\n")
local launchfiles=$(find -L "$package_dir" -name '*.launch' -type f -printf "%f\n")
COMPREPLY=( $(compgen -W "${launchfiles} ${FLAGS[*]} ${OPTS[*]}" -- $cur) )

# Only arguments now
Expand Down
2 changes: 1 addition & 1 deletion rosmon_core/env-hooks/50-rosmon.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function _launch_file() {
_launch_arg
else
package=${line[2]}
files=("${(@f)$(find $(rospack find ${package}) -name '*.launch' -type f -printf "%f\n")}")
files=("${(@f)$(find -L $(rospack find ${package}) -name '*.launch' -type f -printf "%f\n")}")
if [[ $#files -gt 0 ]]; then
_values 'launch files' $files
fi
Expand Down

0 comments on commit b744e79

Please sign in to comment.