override parse_known_args for completion to work with partial argparse tree#446
override parse_known_args for completion to work with partial argparse tree#446dirk-thomas merged 3 commits intomasterfrom
Conversation
…e tree Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
There was a problem hiding this comment.
Now, verb autocompletion and completion of the following arguments work well.
But completion of the command stopped working (it do work on master).
e.g.:
ros2 no # Did autocomplete well to `node` in master, not on this branch.
ros2 launch demo_ # Do autocomplete well to `demo_nodes_*` now, not on master.
ros2 launch demo_nodes_cpp talker_ # Do autocomplete well now, not on master.I'm not pretty sure of what's the problem (I would have to check argparse documentation).
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
ivanpauno
left a comment
There was a problem hiding this comment.
It definetly works and code looks fine, but I can't tell if there's a better way of doing this or not.
Adding a second reviewer sounds like a good idea, maybe @mjcarroll who reviewed #436.
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Therefore I will get this merged. If anyone has a better proposal we can always follow up with a separate PR. |
Fixes regression from #436.