mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Initial commit
This commit is contained in:
14
libexec/tmuxifier-current-session
Executable file
14
libexec/tmuxifier-current-session
Executable file
@@ -0,0 +1,14 @@
|
||||
#! /usr/bin/env bash
|
||||
set -e
|
||||
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
||||
|
||||
if [ ! -z $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
|
||||
Reference in New Issue
Block a user