This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/bin/tmux-session-preview

14 lines
348 B
Plaintext
Raw Normal View History

2021-11-11 13:08:37 -06:00
#!/usr/bin/env sh
session_data="$1"
session_id="$(echo "$session_data" | cut -d':' -f1)"
S="$(tmux ls -F'#{session_id} #{session_name}: #{T:tree_mode_format}' | grep ^"$session_id")"
session_info="${S##$s}"
session_name="$(echo "$session_info" | cut -d ':' -f1)"
echo "RAW: $1"
echo "S: $S"
echo "INFO: $session_info"
echo "NAME: $session_name"