From 6e4ece09753ee1780b579f637559a35e828b5a5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 3 Oct 2015 01:16:21 -0400 Subject: [PATCH] Rewrite tmux aliases --- zsh/aliases.zsh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 3a4a27b8..c6d4f29a 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -98,15 +98,17 @@ alias gre='git remote' if is-callable 'tmux'; then alias t='tmux' alias ts='tmux send-keys' - alias tl='tmux ls' + alias tl='tmux list-sessions' alias ta='tmux attach' - # New instance attached to old session - alias tn='tmux new-session -t $(hostname)' + if [ -n $TMUX ]; then + # Detach all other clients to this session + alias takeover='tmux detach -a' + fi # Start new session or create a grouped session so I'm not simply watching # the same session in both windows. - tdup() {tmux new -s $1 || tmux new -t $1 -s $1-2 || tmux attach -t $1-2;} + tdup() {tmux new-session -t $1} fi if is-mac; then