Skip to content

Commit

Permalink
Add packages skip argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mini-1235 committed Jan 21, 2025
1 parent 8e48a7a commit adf109a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Zsh:
| --- | --- | --- |
| `colcon build --symlink-install` | `cb` |
| `colcon build --symlink-install --packages-select` | `cbp`| package 1 [Optional] ... package n [Optional] |
| `colcon build --symlink-install --packages-skip` | `cbs`| package 1 [Optional] ... package n [Optional] |
| `colcon list` | `cl` |

## Rosdep
Expand Down
14 changes: 14 additions & 0 deletions ros2_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,20 @@ function cbp {
history -s $CMD
}

function cbs {
if [ $# -eq 0 ]; then
PACKAGE=$(colcon list -n | fzf)
[[ -z "$PACKAGE" ]] && return
local CMD="colcon build --symlink-install --packages-skip $PACKAGE"
else
local CMD="colcon build --symlink-install --packages-skip $@"
fi
echo $CMD
$CMD
history -s cbs $@
history -s $CMD
}

function cl {
CMD="colcon list -n"
echo $CMD
Expand Down
14 changes: 14 additions & 0 deletions ros2_utils.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,20 @@ function cbp {
print -s $CMD
}

function cbs {
if [ $# -eq 0 ]; then
PACKAGE=$(colcon list -n | fzf)
[[ -z "$PACKAGE" ]] && return
CMD="colcon build --symlink-install --packages-skip $PACKAGE"
else
CMD="colcon build --symlink-install --packages-skip $@"
fi
echo $CMD
eval $CMD
print -s cbs $@
print -s $CMD
}

function cl {
CMD=(colcon list -n)
echo $CMD
Expand Down

0 comments on commit adf109a

Please sign in to comment.