tmux sessions
This commit is contained in:
parent
c12dd2d0fa
commit
8d9614c918
2
.gitignore
vendored
2
.gitignore
vendored
@ -30,5 +30,5 @@ home/user/.config/tmux/local.conf
|
||||
|
||||
home/user/.tmux/*
|
||||
!home/user/.tmux/dotfiles
|
||||
!home/user/.tmux/temp
|
||||
!home/user/.tmux/sandbox
|
||||
!home/user/.tmux/ssh
|
||||
@ -5,7 +5,11 @@ declare SSH_SERVER
|
||||
read -r SSH_SERVER
|
||||
readonly SSH_SERVER
|
||||
|
||||
readonly SESSION="ssh-${SSH_SERVER}"
|
||||
declare SSH_SERVER_SESSION_NAME
|
||||
SSH_SERVER_SESSION_NAME="$(echo "$SSH_SERVER" | sed 's/\./_/')"
|
||||
readonly SSH_SERVER_SESSION_NAME
|
||||
|
||||
readonly SESSION="ssh-${SSH_SERVER_SESSION_NAME}"
|
||||
|
||||
if ! tmux has-session -t "${SESSION}"; then
|
||||
tmux new-session -s "${SESSION}" -d -n "${MAINW}" -c "${WORKING_PROJECT}" "ssh ${SSH_SERVER}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user