Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz
Created Sep 4, 2013
Embed
What would you like to do?
tmuxでセッションの有無を判別して起動するスクリプト ref: http://qiita.com/d6rkaiz/items/993ef586aa39f2ddb588
#!/bin/bash
tmux ls > /dev/null
if [ $? -eq 1 -a -z "$TMUX" ]; then
exec tmux
elif [ -z "$TMUX" ] ; then
exec tmux attach
else
echo "sessions should be nested with care."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment