summaryrefslogtreecommitdiff
path: root/.local/bin/shorts/ssha
blob: 3cbf87c176949f8f0fa3f23ee403a12b85f0c5fa (plain)
1
2
3
4
5
#!/bin/sh

[ "$TERM" != "${TERM#st-256color}" ] && export TERM=xterm-256color
sshadd "$(find ~/.ssh -name "${1}_id_*" | head -1)"
ssh "$@" -t "tmux attach -t $USER || tmux new -s $USER"