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.
Fix regression introduced in #11.
When trying to complete a partial command like
colcon ext<tab>
theparse_known_args
function fails to parse the partial argument which results in aSystemExit
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 theCOMP_LINE
is an unrelated improvement.