summaryrefslogtreecommitdiff
path: root/bin/mosh-tmux.sh
blob: 55bf295a765c25f58dd8ae18bc4b25f737106da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

set -euo pipefail

if [[ "$#" -ne 1 ]]; then
  >&2 cat <<EOF
Usage:

    $0 <hostname>
EOF
  exit 1
fi

target="${1}"

mosh "sz@$target" -- tmux new-session -As 0