mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
21 lines
344 B
Bash
Executable File
21 lines
344 B
Bash
Executable File
#! /usr/bin/env bash
|
|
set -e
|
|
[ -n "$TMUXIFIER_DEBUG" ] && set -x
|
|
|
|
# Provide tmuxifier help
|
|
if [ "$1" == "--help" ]; then
|
|
echo "usage: tmuxifier current-session
|
|
|
|
Outputs the name of the current Tmux session."
|
|
exit
|
|
fi
|
|
|
|
if [ -n "$TMUX" ]; then
|
|
for item in $(tmux list-pane -F "#{session_name}");do
|
|
echo $item
|
|
exit 0
|
|
done
|
|
fi
|
|
|
|
exit 1
|