random script dump
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tmux_ssh 267B

123456789
  1. #!/usr/bin/env zsh
  2. session_name=ssh
  3. ssh_cmd="termcompat ssh $1"
  4. window_name=${1%%.*}
  5. current_sessions=($(tmux list-sessions -F'#S'))
  6. (( $session_exists[(I)$session_name] )) || tmux new-session -ds $session_name
  7. exec tmux new-window -t ssh: -n $window_name $ssh_cmd