File:  [Paefchen] / home / as / .csh / screen.csh
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Jan 7 06:03:02 2008 UTC (16 years, 10 months ago) by as
Branches: MAIN
CVS tags: HEAD
Hello My Home ;)

# $Paefchen: home/as/.csh/screen.csh,v 1.1 2008/01/07 06:03:02 as Exp $

# CSHRC_RELOAD: YES
# CSHRC_PROMPTONLY: YES
# CSHRC_DESCR: Screen starten, wenn noch keins gestartet ist

if (! $?STY ) then

	if (! $?CSHRC_MD_SCREEN_MOD) then
		set CSHRC_MD_SCREEN_MOD = "auto"
	endif

	if (! $?CSHRC_MD_SCREEN_OPTION) then
		set CSHRC_MD_SCREEN_OPTION = '-D -RR'
	endif

	if (! $?CSHRC_MD_SCREEN_TITLE) then
		set CSHRC_MD_SCREEN_TITLE = 'local'
	endif

	if ($CSHRC_MD_SCREEN_MOD == "auto" && ! $?REMOTEHOST) then
		screen $CSHRC_MD_SCREEN_OPTION -t $CSHRC_MD_SCREEN_TITLE -S local

	else if ($CSHRC_MD_SCREEN_MOD == "ask") then
		while (1)
			echo -n "Soll screen gestartet werden [Y|n|b|h]: "
			set _opt = $<
			if ($_opt == '') set _opt = 'y'
			switch ($_opt)
			case [Yy]:
				screen $CSHRC_MD_SCREEN_OPTION -t $CSHRC_MD_SCREEN_TITLE -S local
				break
			case [Nn]:
				screen -t $CSHRC_MD_SCREEN_TITLE -S local
				break			
			case [Bb]:
				break
			case [Hh:]
				echo "y: startet ein vorhandene Session oder eine neue"
				echo "n: startet eine neues Session"
				echo "b: keine Screen Session"
				echo "h: diese Meldung"
				breaksw
			default
				echo "Ungueltige Angabe"
			endsw
			unset _opt
		end
	endif 
endif