#!/bin/ksh

expr="s/^@[a-z-]* //;s/^\[//;s/[], ].*$//"
file=~/.ssh/known_hosts
host=$(cat $file | sed "$expr" | sort -u | dmenu)
[[ -n "$host" ]] && st -T "[ssh] $host" -e ssh $host
