1 2 3 4 5 6 7
#!/bin/sh host=$(perl -wlne'/^Host\s+(\S+)/ and !/\*/ and print $1' $HOME/.ssh/config \ | dmenu -p "ssh to tmux on host" "$@") if [ -n "$host" ]; then ssh-and-tmux-term "$host" fi