#!/bin/sh -e
#
# tmux-is-astral - astral session in tmux - for use in shell config

if ! cmd-exists tmux; then
  exit 1
fi
if ! ps aux | rg -q '\stmux\s'; then
  exit 1
fi
tmux_session="$(tmux display-message -p '#S')"
case "${tmux_session}" in
  *astral*) ;;
  *) exit 1 ;;
esac
exit 0
