Closed fujitatomoya closed 1 year ago
@iuhilnehc-ynos any idea?
@fujitatomoya
It's not a bug. It's just a feature of bash.
!!
in the bash can call the last command, and please see the double quotes.
Enclosing characters in double quotes (‘"’) preserves the literal value of all characters within the quotes, with the exception of ‘$’, ‘`’, ‘\’, and, when history expansion is enabled, ‘!’.
We can use \
or single quotes to avoid this issue.
$ ros2 topic pub --once /chatter std_msgs/msg/String "data: Hello ROS\!\!"
$ ros2 topic pub --once /chatter std_msgs/msg/String 'data: Hello ROS!!'
@iuhilnehc-ynos thanks for the comment. I actually did not realize that, thanks for the information.
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
successfully publishes
ros2 topic pub --once /chatter std_msgs/msg/String "data: Hello ROS!!"
Actual behavior
fails to issue the command line.