mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
24 lines
422 B
Bash
Executable File
24 lines
422 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
|