Skip to content

Commit 0c5930b

Browse files
committed
Update tmux helper command
1 parent 2e630ad commit 0c5930b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

home/zshrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ fi
130130
# Use 256 color for tmux.
131131
alias tmux="TERM=screen-256color-bce tmux"
132132
# Attempt to take over existing sessions before creating a new tmux session.
133-
TMUX_DEFAULT_SESSION="tmux"
134-
alias t="tmux -u a -d -t ${TMUX_DEFAULT_SESSION} 2> /dev/null || tmux -u new -s ${TMUX_DEFAULT_SESSION}"
133+
t() {
134+
tmux -u new -ADs ${1:-tmux}
135+
}
135136
if [[ -z "$TMUX" ]]; then
136137
# Switch to xterm if we're in a tmux session.
137138
TERM="xterm-256color"

0 commit comments

Comments
 (0)