[from now] 2013/04/27 20:29:01
[from now] 2013/04/27 20:29:01

diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index cd8673b..cc5485f 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -430,18 +430,18 @@ fi

 #起動時にscreen起動
-case "${OSTYPE}" in
-    freebsd*|darwin*|cygwin)
-        if [ $TERM != "screen" ]; then
-            exec screen -U -RR
-        fi
-        ;;
-    linux*)
-        if [ $TERM != "screen-bce" ]; then
-            exec byobu -U -RR
-        fi
-        ;;
-esac
+#case "${OSTYPE}" in
+    #freebsd*|darwin*|cygwin)
+        #if [ $TERM != "screen" ]; then
+            #exec screen -U -RR
+        #fi
+        #;;
+    #linux*)
+        #if [ $TERM != "screen-bce" ]; then
+            #exec byobu -U -RR
+        #fi
+        #;;
+#esac

 # screen 下部に実行コマンド記載
 if [ "$TERM" = "screen" ]; then
@@ -482,6 +482,17 @@ if [ "$TERM" = "screen" ]; then
     #     chpwd
 fi

+if [ $OSTYPE = "cygwin" ]; then
+    if [ $TERM != "screen" ]; then
+        exec screen -U -RR
+    fi
+else
+    # http://filmlang.org/computer/tmux
+    if [ -z $TMUX ]; then
+        tmux attach || tmux
+    fi
+fi
+
 # tmuxの中でsshを実行した場合，新しくウィンドウを作成する
 # http://blog.repl.info/2011/12/03/ssh-with-tmux-and-zsh/
 #if [ $OSTYPE != cygwin ]; then

yukimemi/oh-my-zsh,yukimemi/oh-my-zsh,yukimemi/oh-my-zsh