ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen completely transparently and automatically
See also this related question: https://s
I converted this to work on OS X .bash_profile with one addition: If no 2nd parameter is given, it will start a session "default".
function ssc() { if [[ -z $2 ]]; then screen="default" else screen=$2 fi ssh -t $1 "screen -S $screen -dr || screen -S $screen" }