#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>

function list_tmux_session
{
    local tmux_out=`tmux list-sessions 2>/dev/null`
    [[ -z "$tmux_out" || -n "$TMUX" ]] && return

    echo "You have the following active tmux sessions:"
    for session in ${(f)tmux_out}; do
        echo "    $session"
    done
    echo
}

list_tmux_session "$@"
