colcon-zsh
raw JSON → 0.5.0 verified Mon Apr 27 auth: no python
An extension for the colcon build tool that provides Z shell (zsh) completion scripts. Version 0.5.0, maintained as part of colcon ecosystem, irregular releases.
pip install colcon-zsh Common errors
error ModuleNotFoundError: No module named 'colcon_zsh' ↓
cause colcon-zsh is not installed or installed in a different environment.
fix
Run 'pip install colcon-zsh' in the same environment where colcon is installed.
error colcon: error: argument --shell: invalid choice: 'zsh' (choose from 'bash') ↓
cause colcon-zsh extension is not loaded; colcon does not recognize zsh as a shell option.
fix
Ensure colcon-zsh is installed: 'pip install colcon-zsh' and verify with 'colcon extension list'.
Warnings
gotcha colcon-zsh is only a shell completion provider; it does not affect build behavior. You must source the generated completion script in your .zshrc to use zsh completions. ↓
fix Run 'colcon completion --shell zsh' and source the output, or redirect to a file and source it.
deprecated Python 3.6 support is deprecated as per requires_python; future versions may drop it. ↓
fix Use Python 3.8 or later.
Imports
- colcon_zsh wrong
import colcon_zsh_shellcorrectimport colcon_zsh
Quickstart
import subprocess
result = subprocess.run(['colcon', 'completion', '--shell', 'zsh'], capture_output=True, text=True)
print(result.stdout)