blob: 1cccdba8696c473a944a290eb8fa8da10cde46ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
# Swaps between sessions. It does this by running `fzf` over the list of
# sessions, allowing one to be select which is then attached.
FUZZY="fzf"
TO_REATTACH="$(tmux ls | $FUZZY)"
# TODO: handle the case when nothing was selected.
SESSION_ID="$(echo "$TO_REATTACH" | cut -d':' -f1)"
tmux attach -d -t $SESSION_ID
|