colcon / colcon-argcomplete

Completion for colcon command lines using argcomplete
http://colcon.readthedocs.io
Apache License 2.0
2 stars 3 forks source link

fix completion for partial input #16

Closed dirk-thomas closed 5 years ago

dirk-thomas commented 5 years ago

Fix regression introduced in #11.

When trying to complete a partial command like colcon ext<tab> the parse_known_args function fails to parse the partial argument which results in a SystemExit being raised. That will break the completion.

This patch catches the exception and simply returns no known arguments in that case so the completion can continue.

Using shlex to split the COMP_LINE is an unrelated improvement.