ros2cli icon indicating copy to clipboard operation
ros2cli copied to clipboard

cannot configure optional argument after fzf-based interactive selection

Open fujitatomoya opened this issue 9 months ago • 6 comments

@tonynajjar

i do not think this is issue, should be more like discussion. this just came up in ROS Japan Developer Meeting. looks like this is constrain compared to tab completion.

$ ros2 topic echo <enter>

goes in interactive selection mode, and once we pick the topic, it will execute the command right away. but it is likely that user wants to add the command line argument after the select.

such as,

$ ros2 topic echo /rosout --use-sim-time --clear ...

if we want to add any optional arguments with interactive selection mode, we need to make sure all the optional arguments set before .

nice to have here is that, interactive selection mode just place the selected <topic name> in the command line, and lets the user to continue to assign the optional argument. and finally user is responsible to execute the command?

fujitatomoya avatar Feb 04 '26 11:02 fujitatomoya

I agree that would be better UX. That would also solve the other inefficiency that I experience which is that in the bash_history, only ros2 topic echo is saved, so I can't just quickly press up in the terminal and get the exact command I ran e.g. ros2 topic echo /tf . I'm not sure I'll have time soon to implement it myself sadly

tonynajjar avatar Feb 04 '26 13:02 tonynajjar

@tonynajjar no worries, i just wanted to share this report with you. let's keep this open to see if someone else has time to enhance this.

fujitatomoya avatar Feb 04 '26 22:02 fujitatomoya

This issue has been mentioned on Open Robotics Discourse. There might be relevant details there:

https://discourse.openrobotics.org/t/ros-news-for-the-week-of-february-2nd-2026/52379/1

ros-discourse avatar Feb 06 '26 19:02 ros-discourse

@fujitatomoya Hi I am learning ros, and would love contributing to the ros community. Can I work on this enhancement?

ArkhamKnight25 avatar Feb 17 '26 01:02 ArkhamKnight25

@fujitatomoya san I have created a PR related to this issue.

ArkhamKnight25 avatar Feb 18 '26 08:02 ArkhamKnight25

I still don't see the cleanest and simplest way to implement this but just wanted to mention that a workaround is to specify the options before the topic then pressing Enter:

Image

tonynajjar avatar Jun 17 '26 07:06 tonynajjar