mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
handle tmux sessions better
This commit is contained in:
parent
e627d7d22a
commit
bc1758f51e
1 changed files with 2 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
|||
[ -e /etc/profile ] && emulate sh -c "source /etc/profile"
|
||||
if [ "$SHLVL" -le 1 ] && ! expr "$TERM" : screen >/dev/null; then
|
||||
if which tmux >/dev/null 2>/dev/null; then
|
||||
tmux attach || tmux && exit
|
||||
# create a new session called "what" or attach if it already exists
|
||||
tmux new -A -s what && exit
|
||||
echo "tmux died ($?), continuing..."
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue