diff --git a/zsh/commands b/zsh/commands index 3c93985..ff0a9aa 100644 --- a/zsh/commands +++ b/zsh/commands @@ -27,7 +27,8 @@ whothefuckisusingport() { # functions function tm() { - NUM="$(\tmux ls 2>/dev/null|wc -l)" + OUT="$(\tmux ls 2>/dev/null)" + NUM="$(echo "$OUT" | wc -l)" if [ "$NUM" -eq 0 ] ; then \tmux -2 elif [ "$NUM" -eq 1 ] ; then