source: trunk/debathena/debathena/dotfiles/cshrc @ 24795

Revision 24795, 4.9 KB checked in by geofft, 14 years ago (diff)
In dotfiles: * Undrop the 0debathena business because we're not Debian. * Actually run attach instead of echoing it. I suck.
  • Property svn:executable set to *
RevLine 
[17853]1# Global cshrc file
2#
[22667]3# $Id: cshrc,v 1.12 2007-08-22 18:12:33 ghudson Exp $
[17853]4
5# This file is sourced by default user file ~/.cshrc
6
7
[22913]8set initdir=/usr/lib/init
[17853]9
10# *******************   ENVIRONMENT SETUP   *******************
11
12# Compatibility with older versions of Athena tcsh
13set autolist=""
14if ($?tcsh) then
15  bindkey "^W" backward-delete-word
16  bindkey "^Z" complete-word
17  bindkey " " magic-space
18
19endif
20
[19645]21# Set host type and hostname variables.
[22913]22if (! $?ATHENA_HOSTTYPE) setenv ATHENA_HOSTTYPE "`/bin/machtype`"
[19645]23if (! $?HOST) setenv HOST "`hostname`"
24setenv HOSTTYPE "$ATHENA_HOSTTYPE"
25set hosttype=$HOSTTYPE
26set host=$HOST
27
[17853]28# Set up standard system/user environment configuration (including setup of
[22940]29# environment variables, attachment of lockers, and additions to search path)
[17853]30
31if (! $?ENV_SET) then
32
33  setenv ENV_SET                                # Avoid unnecessary repeat
34
[24770]35  # Ensure user's homedir is attached, for legacy things
36  # that care about attachtab
[24792]37  # Only attach if running as an Athena user, not e.g. using sudo.
[24793]38  if ( $?DEBATHENA_HOME_TYPE ) then
39    if ( $DEBATHENA_HOME_TYPE == afs ) then
40      if ( $?ATHENA_USER ) then
[24795]41        /bin/attach -h -q "$ATHENA_USER"
[24793]42      else
[24795]43        /bin/attach -h -q "$USER"
[24793]44      endif
45    endif
[24792]46  endif
[24770]47
[22975]48  if (-r ~/.generation) then
49    setenv ATHENA_DOTFILE_GENERATION `cat ~/.generation`
50  else
51    setenv ATHENA_DOTFILE_GENERATION 0
52  endif
53
[17853]54  limit coredumpsize 0                  # Don't allow coredumps
55  setenv MORE -s                        # Default "more" behavior
56                                        # we are now down to -s
57                                        # because -d is wrong.
58  setenv EDITOR emacs                   # Set default editor
59  setenv MM_CHARSET iso-8859-1
60
[23438]61  setenv EMAIL "$USER@mit.edu"          # Set default email address
62
[22975]63  # Set double-sided printing for sufficiently recent users.
64  if ( $ATHENA_DOTFILE_GENERATION >= 1 ) then
65    setenv LPROPT -Zduplex
66  endif
67
[22913]68  setenv ATHENA_SYS `/bin/machtype -S`
[17853]69  if ( $ATHENA_SYS == "" ) then
70    setenv ATHENA_SYS @sys
71  endif
[22913]72  setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
[17853]73
74  set bindir=arch/${ATHENA_SYS}/bin
75
[23132]76  if ( ! $?PRINTER && -e /var/run/athena-clusterinfo.csh ) then
77    setenv PRINTER `awk '/LPR/ { print $3 }' /var/run/athena-clusterinfo.csh`
[17853]78    if ( $PRINTER == "" ) unsetenv PRINTER
79  endif
80
81  # Reset the "home" and HOME variables to correspond to the actual
82  # location of the user's home directory.  This will avoid having
83  # long pathnames being printed when /mit/<user> is a symlink to a
84  # path within AFS.
85
[22667]86  set x=`(cd && /bin/pwd)`
[17853]87  if ("$x" != "") then
[22667]88    set home=$x
89    if ("$x" == "`/bin/pwd`") then
90      set cwd=$x
91    endif
[17853]92  endif
93  unset x
94
[23842]95  # NOTE:
96  # The use of the "extend", "sextend", and "textend" aliases in
97  # ~/.environment is no longer supported.  Consult the Athena
98  # documentation on Dotfiles for supported dotfile operations
[23049]99
[17853]100  # Run user environment customizations identified in your
101  # ~/.environment file.  This is the place to include your own
102  # environment variables, attach commands, and other system wide
103  # setup commands.  You can also cancel default behaviors listed
104  # above with "unsetenv" or "setenv".  ~/.environment is not sourced
105  # if NOCALLS is set (i.e., if you selected the xlogin "Ignore your
106  # customizations" option when you logged in).
107
108  if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
109
[23842]110  # NOTE:
111  # .path files are no longer supported, consult Athena documentation
112  # for the correct way to specify your PATH
113 
114  # Standard Athena path additions.
115  set path=(`/usr/bin/athdir $HOME` $path .)
[23049]116
[17853]117endif
118
119# Set appropriate bin directory variable for this platform
120# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
121# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
122set bindir=arch/${ATHENA_SYS}/bin
123
124# *******************  C SHELL SETUP   *******************
125
126# Set up standard C shell initializations
127
128set noclobber                   # Don't overwrite files with redirection
129
130if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
131  set interactive               #   Provide shell variable for compatability
132endif
133
134# Set up standard C shell aliases
135
136if ($?XSESSION) then
[23182]137  alias logout  'exit && gnome-session-save --kill --silent'    # logout for X
[17853]138endif
139
140#   aliases dealing with subjects
141alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
142alias setup_tty '( setenv SUBJECT \!* ; $SHELL )'
143if ($?XSESSION) then
144  alias setup setup_X
145else
146  alias setup setup_tty
147endif
[23782]148alias remove 'setenv SUBJECT \!* ; source $initdir/env_remove ; unsetenv SUBJECT'
[17853]149
150# If this is a subject window, run the env_setup script
151if (($?SUBJECT) && (-r $initdir/env_setup)) source $initdir/env_setup
152
153
154# All of the C shell initializing commands above can be overridden by
155# using "unset" or "unalias" commands (or by changing things using
156# "set" or "alias" again) in your ~/.cshrc.mine file, which is sourced
157# here.  ~/.cshrc.mine is not sourced if the xlogin "Ignore your
158# customizations" option was selected to begin the session.
159
160if ((! $?NOCALLS) && (-r ~/.cshrc.mine)) source ~/.cshrc.mine
Note: See TracBrowser for help on using the repository browser.