addet auto attatch to session
This commit is contained in:
parent
bd0d677436
commit
5078064264
1 changed files with 9 additions and 0 deletions
|
@ -516,6 +516,15 @@ fi
|
|||
|
||||
# Tmux session manager
|
||||
if command_exists tmux; then
|
||||
if [ -z "$TMUX" ]; then
|
||||
# Attach to existing session if any, otherwise create one named 'main'
|
||||
if tmux ls &>/dev/null; then
|
||||
tmux attach-session
|
||||
else
|
||||
tmux new-session
|
||||
fi
|
||||
fi
|
||||
|
||||
ta() {
|
||||
if tmux list-sessions >/dev/null 2>&1; then
|
||||
echo "-- tmux session active! | Connecting to active session --"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue