mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
15 lines
259 B
Bash
Executable File
15 lines
259 B
Bash
Executable File
#! /usr/bin/env bash
|
|
set -e
|
|
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
|
|
|
if [ -n "$TMUX" ]; then
|
|
for item in $(tmux list-sessions -F "#{?session_attached,1,0}:#S"); do
|
|
if [[ "$item" == "1:"* ]]; then
|
|
echo ${item/1:/}
|
|
exit 0
|
|
fi
|
|
done
|
|
fi
|
|
|
|
exit 1
|