diff --git a/.gitignore b/.gitignore index 960f10d..4165084 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/home/user/.tmux/temp b/home/user/.tmux/sandbox similarity index 100% rename from home/user/.tmux/temp rename to home/user/.tmux/sandbox diff --git a/home/user/.tmux/ssh b/home/user/.tmux/ssh index 2aa3227..b0d98ed 100755 --- a/home/user/.tmux/ssh +++ b/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}"