Skip to content

Instantly share code, notes, and snippets.

@kteru
Created July 11, 2014 08:48
Show Gist options
  • Save kteru/0ddab08210bd196fec93 to your computer and use it in GitHub Desktop.
Save kteru/0ddab08210bd196fec93 to your computer and use it in GitHub Desktop.
既にセッションがある時はアタッチ、無いときは新規作成
function tm() {
if [ -n "${1}" ]; then
tmux -2 attach-session -t ${1} || \
tmux -2 new-session -s ${1}
else
tmux -2 attach-session || \
tmux -2 new-session
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment