diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-03-01 13:34:08 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-03-01 13:34:08 +0100 |
commit | ec9c3d65d460e14f4576d74ec1842059f592a913 (patch) | |
tree | 0c85c1947f49c1b9258158799e8dc7ba9b4140f3 /.zprofile | |
parent | 305106d6f486066331b3e36080604a62766df150 (diff) | |
download | dotfiles-ec9c3d65d460e14f4576d74ec1842059f592a913.tar.gz dotfiles-ec9c3d65d460e14f4576d74ec1842059f592a913.tar.xz |
zprofile: clean up tmux sessions when detaching
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zprofile')
-rw-r--r-- | .zprofile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,7 +4,10 @@ if tty -s && [[ -z $DISPLAY ]]; then if ! tmux has -t "autosession"; then exec tmux new -s "autosession" else - exec tmux new -t "autosession" + session=$(tmux new-session -t "autosession" -P -F "#{session_name}" -d) + tmux attach-session -t $session + tmux kill-session -t $session + exit fi fi fi |