Skip to content

Instantly share code, notes, and snippets.

@wjimenez5271
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save wjimenez5271/0ec559889dd87d95de32 to your computer and use it in GitHub Desktop.

Select an option

Save wjimenez5271/0ec559889dd87d95de32 to your computer and use it in GitHub Desktop.
check_tmux_session.sh
if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then
sessions="$(tmux list-sessions 2> /dev/null)"
if [ $? -eq 0 ]
then
echo "------------- you have open tmux sessions --------------"
echo "$sessions"
echo "--------------------------------------------------------"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment