colcon-cd

raw JSON →
0.1.1 verified Mon Apr 27 auth: no python

A shell function for colcon that allows changing the current working directory to the package base path. It is part of the colcon ecosystem and used in ROS 2 development. Current version is 0.1.1, released infrequently.

pip install colcon-cd
error ModuleNotFoundError: No module named 'colcon_cd'
cause Trying to import colcon-cd as a Python module.
fix
colcon-cd is not a Python module; use it as a shell command instead.
error bash: colcon: command not found
cause colcon not installed or not in PATH.
fix
Install colcon-core with pip install colcon-common-extensions.
gotcha colcon-cd is a shell extension, not a Python module. Attempting to import it in Python will fail or be meaningless.
fix Use as a shell command: source colcon_cd hook or eval '$(colcon cd)'
gotcha Requires colcon-core to be installed and the shell hook to be sourced before use.
fix Install colcon-core and ensure .bashrc or .zshrc sources colcon's shell completion.

colcon-cd provides a shell function; typical usage is via sourcing.

# colcon-cd is a shell function, not a Python library.
# Source the shell completion or use it directly:
# eval "$(colcon cd)"