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

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