Files
tmuxifier/libexec/tmuxifier-current-session
Jim Myhrberg e231f2d642 Enable passing custom arguments to tmux
Custom arguments can now be passed to tmux by setting the
TMUXIFIER_TMUX_OPTS environment variable.
2014-01-29 08:11:20 +00:00

24 lines
419 B
Bash
Executable File

#! /usr/bin/env bash
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if calling-help "$@"; then
echo "usage: tmuxifier current-session
Outputs the name of the current Tmux session."
exit
fi
if [ -n "$TMUX" ]; then
for item in $(tmuxifier-tmux list-pane -F "#{session_name}");do
echo $item
exit 0
done
fi
exit 1