Files
tmuxifier/libexec/tmuxifier-current-session
Jim Myhrberg adb008b301 style(shell): improve shell script formatting and quoting
Apply shfmt formatting and fix some schellcheck complaints.
2025-12-01 23:04:40 +00:00

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