Skip to content

tab-complete should only list options if a - (dash) is inserted #507

@Timple

Description

@Timple

Description

Current behavior:

ros2 launch my_pkg <tab><tab>
--debug                         --show-all-subprocesses-output  -p
--launch-prefix                 --show-args                     -s
--launch-prefix-filter          --show-arguments                actual_launchfile.launch.xml
--noninteractive                -a                              parameter_file.yaml
--print                         -d                              yet_another_launchfile.launch.xml
--print-description             -n                              package.xml

Prefered behavior:

ros2 launch my_pkg <tab><tab>
actual_launchfile.launch.xml     parameter_file.yaml            yet_another_launchfile.launch.xml
package.xml
ros2 launch my_pkg -<tab><tab>                    <-- Notice the dash before the tab
--debug                         --print-description             -d
--launch-prefix                 --show-all-subprocesses-output  -n
--launch-prefix-filter          --show-args                     -p
--noninteractive                --show-arguments                -s
--print                         -a     

Motivation

I can't see the forest through all the trees.

Folks know before they hit tab if they are actually looking for options or launchfiles. So they might as well indicated that.

Design / Implementation Considerations

Modify tab complete to only suggest options if a dash has already been entered.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions