Skip to content

feat(shell): reintroduce ros.plugin.sh#757

Merged
texhnolyze merged 1 commit intomainfrom
feature/pixi-shell-improvements
Mar 10, 2026
Merged

feat(shell): reintroduce ros.plugin.sh#757
texhnolyze merged 1 commit intomainfrom
feature/pixi-shell-improvements

Conversation

@texhnolyze
Copy link
Contributor

which handles aliases and tab completion for ros2 and colcon.
Only in comparison to previous iterations we now have two expected
modes:

  • normal zsh
  • zsh started by pixi shell parent process

In a normal zsh environment we alias ros2 and colcon commands
to the configured pixi tasks in the ROS_WORKSPACE.

In a pixi shell we instead overwrite those aliases with direct
execution of ros2 and colcon to allow for tab completion.
This helps a lot with commands, that are dependent on the environment
like:

  • ros2 topic echo (showing available topics on tab)
  • colcon build --packages-select (showing available packages)

To allow for this tab completion, we have to manually generate the
completions into $CONDA_PREFIX/share/zsh/site-functions with
register-python-argcomplete as they are not part of the conda
packages.

Related issues

Checklist

  • Run pixi run build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

@texhnolyze texhnolyze self-assigned this Mar 8, 2026
@github-project-automation github-project-automation bot moved this to 🆕 New in Software Mar 8, 2026
@texhnolyze texhnolyze moved this from 🆕 New to 🔖 Ready in Software Mar 8, 2026
@texhnolyze texhnolyze added enhancement New feature or request tooling labels Mar 8, 2026
@texhnolyze texhnolyze requested review from ChlukasX, Flova and jaagut March 8, 2026 21:17
which handles aliases and tab completion for `ros2` and `colcon`.
Only in comparison to previous iterations we now have two expected
modes:
- normal `zsh`
- `zsh` started by `pixi shell` parent process

In a normal `zsh` environment we alias `ros2` and `colcon` commands
to the configured `pixi` tasks in the `ROS_WORKSPACE`.

In a `pixi shell` we instead overwrite those aliases with direct
execution of `ros2` and `colcon` to allow for tab completion.
This helps a lot with commands, that are dependent on the environment
like:
- `ros2 topic echo` (showing available topics on tab)
- `colcon build --packages-select` (showing available packages)

To allow for this tab completion, we have to manually generate the
completions into `$CONDA_PREFIX/share/zsh/site-functions` with
`register-python-argcomplete` as they are not part of the conda
packages.
@texhnolyze texhnolyze force-pushed the feature/pixi-shell-improvements branch from b50f175 to 5b04031 Compare March 9, 2026 13:24
@github-project-automation github-project-automation bot moved this from 🔖 Ready to 👀 In review in Software Mar 9, 2026
@texhnolyze texhnolyze merged commit 57996c0 into main Mar 10, 2026
2 checks passed
@texhnolyze texhnolyze deleted the feature/pixi-shell-improvements branch March 10, 2026 10:47
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Software Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tooling

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants