cssh: donner un nom à la session
This commit is contained in:
parent
9555874ec3
commit
725ba6d2c2
|
@ -33,8 +33,9 @@ function __auto_screen() {
|
|||
|
||||
local msgprefix
|
||||
local screens count
|
||||
local session_name="nutools-$USER"
|
||||
|
||||
screens="$(LANG=C screen -ls | grep -Ei "attached|detached")"
|
||||
screens="$(LANG=C screen -ls | grep -Ei "${session_name}.*attached|detached")"
|
||||
if [ -n "$screens" ]; then
|
||||
count="$(echo "$screens" | wc -l)"
|
||||
else
|
||||
|
@ -52,14 +53,14 @@ La première session"
|
|||
if __ask "
|
||||
$msgprefix sera reconnectée automatiquent dans 2 secondes
|
||||
Voulez-vous reconnecter la session screen? [On] "; then
|
||||
exec screen -q -s -/bin/bash -xRR
|
||||
exec screen -q -s -/bin/bash -xRR -S "$session_name"
|
||||
else
|
||||
exec /bin/bash -l
|
||||
fi
|
||||
elif __ask "
|
||||
Une ${COULEUR_VERTE}nouvelle session screen${COULEUR_NORMALE} sera lancée automatiquement dans 2 secondes
|
||||
Voulez-vous lancer une session screen? [On] "; then
|
||||
exec screen -q -s -/bin/bash -RR
|
||||
exec screen -q -s -/bin/bash -RR -S "$session_name"
|
||||
else
|
||||
exec /bin/bash -l
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue