https://github.com/colcon/colcon-spawn-shell
Source a colcon workspace in a new shell
https://github.com/colcon/colcon-spawn-shell
colcon
Last synced: 5 months ago
JSON representation
Source a colcon workspace in a new shell
- Host: GitHub
- URL: https://github.com/colcon/colcon-spawn-shell
- Owner: colcon
- License: apache-2.0
- Created: 2018-04-29T22:41:54.000Z (about 8 years ago)
- Default Branch: develop
- Last Pushed: 2024-11-25T21:35:41.000Z (over 1 year ago)
- Last Synced: 2025-12-09T14:25:22.210Z (7 months ago)
- Topics: colcon
- Language: Python
- Homepage: http://colcon.readthedocs.io
- Size: 42 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
==================
Colcon Spawn Shell
==================
Introduction
------------
This is a `colcon `_ plugin to chain workspaces in new shells.
It allows quickly un-chaining workspaces by exiting the spawned shell.
The shell's prompt is edited to show the workspace order.
The only supported shell is **bash**.
.. image:: https://raw.githubusercontent.com/colcon/colcon-spawn-shell/8de6d0a687619bfd8342647b6d216695bb76dfaf/doc/colcon_spawn_shell_example.gif
Quick Start
-----------
**Optional:** Create and source a virtual environment.
.. code-block:: bash
python3 -m venv env
. env/bin/activate
From Pip
~~~~~~~~
1. Download ``colcon-spawn-shell`` from pip.
.. code-block:: bash
pip install colcon-spawn-shell
2. Build the colcon workspace you would like to spawn in a new shell.
.. code-block:: bash
cd my_cool_workspace
colcon build
3. Source ``spawn_shell.bash`` to activate the workspace.
.. code-block:: bash
. install/spawn_shell.bash
_`From Source`
~~~~~~~~~~~~~~
.. note::
It's recommended to install to a virutal environment for development.
See `this tutorial `_ for more information.
1. Download the source code for ``colcon-spawn-shell``
.. code-block:: bash
mkdir -b spawn_shell_ws/src
cd spawn_shell_ws/src
git clone https://github.com/colcon/colcon-spawn-shell.git
2. Build the workspace using colcon
.. code-block:: bash
colcon build
3. Source the workspace
.. code-block:: bash
. install/local_setup.bash
From now on future workspaces can be activated by sourcing ``spawn_shell.bash``
.. code-block:: bash
cd my_cool_workspace
colcon build
. install/spawn_shell.bash
Contributing
------------
1. `Fork `_ the `colcon/colcon-spawn-shell `_ repository.
2. Follow the `"From Source" instructions `_, except clone your forked repository.
3. Make changes and commit them to a branch.
.. code-block:: bash
# Creat a branch for your changes
git checkout -b my-cool-changes
# Make your changes ...
git commit -m "committing my changes"
# Push them to your fork
git push --set-upstream origin my-cool-changes
4. Create a `Pull Request `_ from your branch to the branch **develop** on `colcon/colcon-spawn-shell `_
.. note::
Please create pull requests from the branch **develop** because `this repository `_ uses the `nvie git branching model `_.