#!/bin/bash # Called by the SSH Launcher applet as: ssh-tmux ssh [flags] host="${@: -1}" name="ssh_${host//[^A-Za-z0-9_-]/_}" exec tmux new-session -A -s "$name" "$(printf '%q ' "$@")"