#!/bin/tcsh

#
#  Use ./con to get a list of detached screens...
#
#	or just use './con tfc'  or  './con dm'
#
#	when in the console use ESC or CTRL-C to deatch again.	
#
if ( $# > 0 ) then
	set scr = $1
else
	screen -list | grep -v Socket | sed -e 's/[0-9]*\.//' -e 's/(.*)//'
	echo -n "when in console, dont use quit, use ESC. Pick a screen [tfc]: "
	set scr = $<
	if ( $scr == "" ) set scr = tfc
endif

screen -r $scr
