tmux : add tda to detach all other clients.

This commit is contained in:
Dmitry Voronin 2023-12-10 16:56:56 +03:00
parent 982e79e595
commit 922e61b482
2 changed files with 8 additions and 2 deletions

View file

@ -8,7 +8,7 @@ function ta() {
if [[ "$name" = "" ]]; then
name="main"
fi
# call tmux.
tmux new -s "$name" 2> /dev/null || tmux attach-session -t "$name"
}
@ -18,6 +18,11 @@ function td() {
tmux detach-client
}
# Detach all other tmux clients.
function tda() {
tmux detach-client -a
}
# List running sessions.
function tl() {
tmux list-sessions
@ -51,7 +56,7 @@ function tk() {
if [[ "${1}" = "" ]]; then
1="main"
fi
# call tmux.
for name in "$@"; do
tmux kill-session -t "${name}"

View file

@ -309,6 +309,7 @@ Command|Description
---|---
`ta [NAME]`|Create/attach to named session. By default uses name `main`.
`td`|Detach from running session.
`tda`|Detach all other tmux clients.
`tl`|List running sessions.
`trn [NAME]`|Rename current session. Uses current dir name by default.
`tn [NAME]`|Assign name to window. Uses current dir name by default.