Improve git worktree session workflow

This commit is contained in:
2026-08-10 12:42:53 +01:00
parent c97c9cb027
commit 56b5bdb5ac
6 changed files with 67 additions and 4 deletions

View File

@@ -4,9 +4,12 @@ set -e
sessions=()
# Get list of predefined session layouts
# Get list of predefined session layouts, skipping session-project since it is
# parameterized by `session -p <project>` rather than a session of its own
for item in $HOME/.local/share/tmux/layouts/session-*; do
sessions+=(${item#$HOME/.local/share/tmux/layouts/session-})
layout=${item#$HOME/.local/share/tmux/layouts/session-}
[ "$layout" = project ] && continue
sessions+=($layout)
done
# Get list of existing sessions