colcon-argcomplete
raw JSON → 0.3.3 verified Mon Apr 27 auth: no python
Provides shell tab-completion for colcon (the Collective Construction tool for ROS) using the argcomplete library. Version 0.3.3 is the latest; released sporadically, last updated in 2022.
pip install colcon-argcomplete Common errors
error ModuleNotFoundError: No module named 'colcon_argcomplete' ↓
cause Package not installed or installed in a different Python environment.
fix
pip install colcon-argcomplete
error RuntimeError: Completion not registered. Ensure 'argcomplete' is installed and activated. ↓
cause Argcomplete not activated in the shell or missing from PATH.
fix
Run: eval "$(register-python-argcomplete colcon)"
Warnings
gotcha Requires the argcomplete Python package to be installed and activated (e.g., eval "$(register-python-argcomplete colcon)") in your shell. ↓
fix Install argcomplete and run: eval "$(register-python-argcomplete colcon)"
gotcha Completion only works when colcon is invoked directly, not through symlinks or aliases. ↓
fix Use the full path to colcon or ensure the symlink resolves correctly.
deprecated This package is part of the colcon ecosystem and may not receive updates if argcomplete changes its API. ↓
fix Monitor the colcon-argcomplete GitHub repo for compatibility.
Imports
- activate_argcomplete
from colcon_argcomplete import activate_argcomplete
Quickstart
from colcon_argcomplete import activate_argcomplete
import argparse
parser = argparse.ArgumentParser()
activate_argcomplete(parser)
args = parser.parse_args()
print(args)