head     1.9;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.9
date     96.01.28.16.50.50;  author svalente;  state Exp;
branches ;
next     1.8;

1.8
date     96.01.28.15.37.03;  author svalente;  state Exp;
branches ;
next     1.7;

1.7
date     95.12.26.21.57.50;  author ghudson;  state Exp;
branches ;
next     1.6;

1.6
date     95.12.16.04.05.42;  author ghudson;  state Exp;
branches ;
next     1.5;

1.5
date     95.09.12.04.03.32;  author ghudson;  state Exp;
branches ;
next     1.4;

1.4
date     95.08.09.20.51.41;  author ghudson;  state Exp;
branches ;
next     1.3;

1.3
date     95.06.27.15.45.30;  author ghudson;  state Exp;
branches ;
next     1.2;

1.2
date     95.03.25.02.48.52;  author svalente;  state Exp;
branches ;
next     1.1;

1.1
date     95.03.23.02.51.45;  author svalente;  state Exp;
branches ;
next     ;


desc
@cshrc
@


1.9
log
@Run athena_path and athena_manpath through makepath.
@
text
@# Global cshrc file
#
# $Id: cshrc,v 1.8 96/01/28 15:37:03 svalente Exp Locker: svalente $

# This file is sourced by default user file ~/.cshrc

set initdir=/usr/athena/lib/init

# *******************   ENVIRONMENT SETUP   *******************

# Set standard path variables, for reference (actual paths set later in file).

# Set standard Athena path variable (generic path for all users):
set athena_path = ( /srvd/patch /usr/local/sbin /usr/local/bin \
		    /usr/athena/bin /bin/athena /usr/X11/bin /usr/bin/X11 \
		    /sbin /usr/sbin /usr/bin /bin /usr/andrew/bin /usr/games )

# Set standard path of directories for man command to search:
set athena_manpath = ( /usr/athena/man /usr/X11/man /usr/man \
		       /usr/man/preformat /usr/share/man )

set athena_path    = `/bin/athena/makepath -s $athena_path`
set athena_manpath = `/bin/athena/makepath $athena_manpath`

# Set appropriate bin directory variable for this platform
# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
if (! $?hosttype ) set hosttype=`/bin/athena/machtype`
set bindir=${hosttype}bin

# Set up standard system/user environment configuration (including setup of
# environment variables, attachment of lockers, and setting of search path)

if (! $?ENV_SET) then

	setenv ENV_SET				# Avoid unnecessary repeat

	umask 077				# Strictly protect files
						#  (does not apply in AFS)
	limit coredumpsize 0			# Don't allow coredumps
	if ( "$hosttype" == "inbsd" ) then
		setenv MORE -cs			# -d only recently supported
	else
		setenv MORE -csd		# Default "more" behavior
	endif
	setenv EDITOR emacs			# Set default editor
	setenv VISUAL emacs			# Set default screen editor
	setenv RSUSERHOME ~/rsuserhome		# Default RS/1 directory for R3

	setenv MANPATH $athena_manpath

	setenv ATHENA_SYS `/bin/athena/machtype -S`
	if ( $ATHENA_SYS == "" ) then
		unsetenv ATHENA_SYS
	endif

	if ( ! $?PRINTER && -e /etc/athena/clusterinfo ) then
	  setenv PRINTER `awk '/LPR/ { print $3 }' /etc/athena/clusterinfo`
	  if ( $PRINTER == "" ) unsetenv PRINTER
	endif

	# Reset the "home" and HOME variables to correspond to the
	# actual location of the user's home directory.  This will
	# avoid having long pathnames being printed when /mit/<user>
	# is a symlink to a path within AFS.
	#
	# This code has been optimized to run as quickly as possible.
	# Since it is being invoked only at the beginning of the
	# session, and prior to the inclusion of any of the user's
	# other dotfiles, we can assume that the current directory
	# is the user's home directory.  Also, to avoid having the
	# shell re-evaluate the current contents of the directory,
	# we help it by resetting its "cwd" variable.  We do error
	# checking just in case the path somehow disappears.

	set x=`/bin/pwd`
	if ("$x" != "") then
		set home=$x cwd=$x
	endif
	unset x

	# Special version of add alias that will work in your ~/.environment
	# file.  This is replaced further down with the version that works
	# when you are logged in.

	# This "extend" alias and friends have been left in for backwards
	# compatibility with old .environment files, just in case. The new
	# add alias does not use them.
	alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
	if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
	if ($?extendyes) setenv \!:1 ${\!:1}:\!:2 && \\
	unset extendyes'
	alias sextend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
	if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
	if ($?extendyes) set \!:1=(${\!:1} \!:2) && \\
	unset extendyes'
	alias textend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
	if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
	if ($?extendyes) set \!:1=${\!:1}:\!:2 && \\
	unset extendyes'

	alias add 'set add_opts = (-e \!:*); source $initdir/add'

	# Run user environment customizations identified in your ~/.environment
	# file.  This is the place to include your own environment variables,
	# attach commands, and other system wide setup commands.  You can also
	# cancel default behaviors listed above with "unsetenv" or "setenv".
	# ~/.environment is not sourced if NOCALLS is set (i.e., if 
	# you selected the xlogin "Ignore your customizations" option
	# when you logged in). 

        if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
	
	# remove temporary version of add
	unalias extend sextend textend add
	alias add 'echo Use add in your ~/.environment, not your ~/.path.'

	# Set up default search path, if not yet set.  Use your ~/.path file
	# to provide an alternative path -- this file should be of the form
	# "set path=...", and can refer to the shell variable $athena_path,
	# defined above. The ~/.path file should list a complete path, since 
	# the path identified there will be used INSTEAD of the default path, 
	# not appended.  ~/.path is not sourced if the xlogin "Ignore your
	# customizations" option was selected to begin the session.

	if ((! $?NOCALLS) && (-r ~/.path)) then
		source ~/.path				# User-specified path
	else
		set path=($HOME/$bindir $athena_path .)	# Standard Athena path
	endif

endif
	


# *******************  C SHELL SETUP   *******************

# Set up standard C shell initializations

set noclobber			# Don't overwrite files with redirection

if ($?prompt) then		# For interactive shells only (i.e., NOT rsh):
    set prompt = "athena% "	#   Set prompt
    set history = 20		#   Number of commands saved as history
    set cdpath = (~)		#   Path to search for directory changes
    set interactive		#   Provide shell variable for compatability
endif


# Set up standard C shell aliases

#   alias for re-establishing authentication
alias renew 'kinit $USER && fsid -a && zctl load /dev/null'

#   alias for a convenient way to change terminal type
alias term 'set noglob; unsetenv TERMCAP; eval `tset -s -I -Q \!*`'

#   aliases dealing with mail
alias mail 'Mail'
alias Mail 'more /usr/prototype_user/README.mail ; echo \!* > /dev/null'

#   aliases dealing with x window system
alias xresize 'set noglob; eval `resize` || unset noglob'	# xresize

if ($?XSESSION) then
    if ("$XSESSION" == "") then
	alias logout	'exit && end_session'		# logout for X
    else
	alias logout	'exit && kill -HUP $XSESSION'	# logout for X
    endif
endif

#   aliases dealing with adding locker programs
#   extend remains for other software; add no longer uses the extend alias
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
	if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
	if ($?extendyes) setenv \!:1 ${\!:1}:\!:2 && \\
	unset extendyes'

alias add 'set add_opts = (\!:*); source $initdir/add'

#   aliases dealing with subjects
alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
alias setup_tty '( setenv SUBJECT \!* ; csh )'
if ($?XSESSION) then
	alias setup setup_X
else
	alias setup setup_tty
endif
alias remove 'setenv SUBJECT \!* ; source $initdir/env_remove'

# If this is a subject window, run the env_setup script
if (($?SUBJECT) && (-r $initdir/env_setup)) source $initdir/env_setup


# All of the C shell initializing commands above can be overridden by using 
# "unset" or "unalias" commands (or by changing things using "set" or 
# "alias" again) in your ~/.cshrc.mine file, which is sourced here.
# ~/.cshrc.mine is not sourced if the xlogin "Ignore your customizations"
# option was selected to begin the session.

if ((! $?NOCALLS) && (-r ~/.cshrc.mine)) source ~/.cshrc.mine
@


1.8
log
@Added /usr/bin/X11 to the path.  /usr/X11/bin is still in the path,
which may be annoying.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.7 1995/12/26 21:57:50 ghudson Exp $
d14 3
a16 3
set athena_path=( /srvd/patch /usr/local/sbin /usr/local/bin /usr/athena/bin \
		/bin/athena /usr/X11/bin /usr/bin/X11 /sbin /usr/sbin \
		/bin /usr/bin /usr/andrew/bin /usr/games )
d18 7
a29 7

# Set standard path of directories for man command to search:
#
# /usr/man/preformat is used by slackware linux
# /usr/share/man is used by netbsd
#
set athena_manpath=/usr/athena/man:/usr/X11/man:/usr/man:/usr/man/preformat:/usr/share/man
@


1.7
log
@Add necessary backslash.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.6 1995/12/16 04:05:42 ghudson Exp ghudson $
d15 2
a16 2
		/bin/athena /usr/X11/bin /sbin /usr/sbin /bin /usr/bin \
		/usr/andrew/bin /usr/games )
@


1.6
log
@Update path to include /usr/local/sbin and /usr/games; nuke /usr/ibm.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.5 1995/09/12 04:03:32 ghudson Exp ghudson $
d15 1
a15 1
		/bin/athena /usr/X11/bin /sbin /usr/sbin /bin /usr/bin
@


1.5
log
@"limit coredumpsize 0 k" was needed due to a bug in /bin/athena/login;
remove gratiutous difference now that it's unnecessary.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.4 1995/08/09 20:51:41 ghudson Exp ghudson $
d14 3
a16 3
set athena_path=( /srvd/patch /usr/local/bin /usr/athena/bin /bin/athena \
		/usr/X11/bin /sbin /usr/sbin /bin /usr/bin /usr/ibm \
		/usr/andrew/bin )
@


1.4
log
@Sync with changes which were made to
/mit/netbsd/dev/athena/xdm/init/cshrc since creation of merged
version.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.3 1995/06/27 15:45:30 ghudson Exp ghudson $
d40 1
a40 1
	limit coredumpsize 0 k			# Don't allow coredumps
@


1.3
log
@Change "limit coredumpsize 0" to "limit coredumpsize 0 k", since our
/bin/athena/tcsh won't handle the former.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.2 1995/03/25 02:48:52 svalente Exp ghudson $
d14 3
a16 2
set athena_path=( /srvd/patch /usr/athena/bin /bin/athena /usr/X11/bin \
		/usr/new /usr/ucb /bin /usr/bin /usr/ibm /usr/andrew/bin )
d40 1
a40 2
	limit coredumpsize 0 k           	# Don't allow coredumps
	setenv ATHENA_MORE -csd			# Athena "more" behavior
d42 1
a42 1
		setenv MORE -cs			# Default "more" behavior
d44 1
a44 1
		setenv MORE ${ATHENA_MORE}	# Default "more" behavior
d54 1
a54 1
		  unsetenv ATHENA_SYS
d156 1
a156 1
alias term 'set noglob; unsetenv TERMCAP; eval `tset -s -I -Q - \!*`'
@


1.2
log
@Path change:  /usr/bin/X11 -> /usr/X11/bin
Manpath change:  /usr/X11/man:/usr/share/man:/usr/man/preformat added.
Changed machtype from /srvd/bin/athena/machtype to /bin/athena/machtype.
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.2 1995/03/23 04:17:21 svalente Exp svalente $
d39 1
a39 1
	limit coredumpsize 0            	# Don't allow coredumps
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
# $Id: cshrc,v 1.27 1994/12/30 04:07:32 cfields Exp cfields $
d14 1
a14 1
set athena_path=( /srvd/patch /usr/athena/bin /bin/athena /usr/bin/X11 \
d20 1
d24 5
a28 2
set athena_manpath=/usr/athena/man:/usr/man

d40 6
a45 1
	setenv MORE -csd			# Default "more" behavior
d52 1
a52 1
	setenv ATHENA_SYS `/srvd/bin/athena/machtype -S`
@
