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

rosbash: "find: paths must precede expression" on auto-complete attempt of rosmsg (with msg files in the CWD) #192

Closed
gavanderhoorn opened this issue Sep 4, 2018 · 3 comments
Labels

Comments

@gavanderhoorn
Copy link

gavanderhoorn commented Sep 4, 2018

To reproduce:

docker run -it --rm ros:melodic
source /opt/ros/melodic/setup.bash
roscd sensor_msgs/msg
rosmsg show sen<tab>

error returned then is:

find: paths must precede expression: `CameraInfo.msg'
find: possible unquoted pattern after predicate `-name'?

I've tried to understand what is going on in the auto-complete hook for rosmsg, but I've never had the pleasure of working with compgen so it's all black magic to me. It seems like the problem could be somewhere around:

ros/tools/rosbash/rosbash

Lines 902 to 905 in fd86014

show|info|users|md5)
opts=$(_msg_opts ${COMP_WORDS[$COMP_CWORD]})
COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;;

@gavanderhoorn gavanderhoorn changed the title rosbash: "find: paths must precede expression" on auto-complete attempt of rosmsg rosbash: "find: paths must precede expression" on auto-complete attempt of rosmsg (with msg files in the CWD) Sep 4, 2018
@gavanderhoorn
Copy link
Author

I have a hunch that something like this is happening.

@dirk-thomas dirk-thomas added the bug label Sep 4, 2018
jexner added a commit to jexner/ros that referenced this issue May 16, 2019
The `find` argument glob is not properly quoted resulting in bash filename
expansion. This leads to incorrect `find` calls.

This fixes issue ros#192.
@jexner
Copy link
Contributor

jexner commented May 16, 2019

@gavanderhoorn Yes, that was the actual issue. #218 provides a fix.

dirk-thomas pushed a commit that referenced this issue Aug 12, 2019
The `find` argument glob is not properly quoted resulting in bash filename
expansion. This leads to incorrect `find` calls.

This fixes issue #192.
@dirk-thomas
Copy link
Member

Addressed by #218.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants